mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 13:00:19 +00:00
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:
parent
c25f572ae0
commit
1b39b82a85
@ -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 {
|
if err != nil {
|
||||||
log.ErrorLog(ctx, "failed to get clone state: %v", err)
|
log.ErrorLog(ctx, "failed to get clone state: %v", err)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user