mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
Fix issues found in gometalinter
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
@ -229,7 +229,12 @@ func attachRBDImage(volOptions *rbdVolume, userID string, credentials map[string
|
||||
devicePath, found := waitForPath(volOptions.Pool, image, 1, useNBD)
|
||||
if !found {
|
||||
attachdetachMutex.LockKey(imagePath)
|
||||
defer attachdetachMutex.UnlockKey(imagePath)
|
||||
|
||||
defer func() {
|
||||
if err = attachdetachMutex.UnlockKey(imagePath); err != nil {
|
||||
glog.Warningf("failed to unlock mutex imagepath:%s %v", imagePath, err)
|
||||
}
|
||||
}()
|
||||
|
||||
_, err = execCommand("modprobe", []string{moduleName})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user