From 0c262ba9de1cf2e36289a4ca81b3559d04abd185 Mon Sep 17 00:00:00 2001 From: mtanino Date: Wed, 26 Jul 2017 19:41:42 -0400 Subject: [PATCH] FC volume plugin: remove unmount of global mount --- pkg/volume/fc/disk_manager.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkg/volume/fc/disk_manager.go b/pkg/volume/fc/disk_manager.go index 7602a9dc227..07d7c2ec532 100644 --- a/pkg/volume/fc/disk_manager.go +++ b/pkg/volume/fc/disk_manager.go @@ -79,24 +79,10 @@ func diskTearDown(manager diskManager, c fcDiskUnmounter, volPath string, mounte return os.Remove(volPath) } - refs, err := mount.GetMountRefs(mounter, volPath) - if err != nil { - glog.Errorf("failed to get reference count %s", volPath) - return err - } if err := mounter.Unmount(volPath); err != nil { glog.Errorf("failed to unmount %s", volPath) return err } - // If len(refs) is 1, then all bind mounts have been removed, and the - // remaining reference is the global mount. It is safe to detach. - if len(refs) == 1 { - mntPath := refs[0] - if err := manager.DetachDisk(c, mntPath); err != nil { - glog.Errorf("failed to detach disk from %s", mntPath) - return err - } - } noMnt, mntErr := mounter.IsLikelyNotMountPoint(volPath) if mntErr != nil {