cephfs: avoid variable shadowing

Avoiding variable shadowing as it
becomes hard to debug this kind of
issues in real enviroment.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2023-11-02 11:46:57 +01:00 committed by mergify[bot]
parent c25f572ae0
commit 1b39b82a85

View File

@ -157,7 +157,9 @@ func (s *subVolumeClient) CreateCloneFromSnapshot(
}
}
}()
cloneState, err := s.GetCloneState(ctx)
var cloneState cephFSCloneState
// avoid err variable shadowing
cloneState, err = s.GetCloneState(ctx)
if err != nil {
log.ErrorLog(ctx, "failed to get clone state: %v", err)