aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver/mounter.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2023-08-06 18:21:55 -0700
committerGitHub <noreply@github.com>2023-08-06 18:21:55 -0700
commit615c145190e7cb880bf2542d3ae9e750b28b9a89 (patch)
treee3c646e031c35b0299d58407994b10b5ed38a89a /pkg/driver/mounter.go
parentd777b8750bb2dd33948988f4eec8813e6207a0cd (diff)
parenteca9cde95a899ab5645b00d8c0d547abd4bc7e8e (diff)
downloadseaweedfs-csi-driver-615c145190e7cb880bf2542d3ae9e750b28b9a89.tar.xz
seaweedfs-csi-driver-615c145190e7cb880bf2542d3ae9e750b28b9a89.zip
Merge pull request #131 from kvaster/refactor-1
Update dependencies
Diffstat (limited to 'pkg/driver/mounter.go')
-rw-r--r--pkg/driver/mounter.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/driver/mounter.go b/pkg/driver/mounter.go
index 909e6ec..64eae33 100644
--- a/pkg/driver/mounter.go
+++ b/pkg/driver/mounter.go
@@ -10,7 +10,7 @@ import (
"os/exec"
"github.com/seaweedfs/seaweedfs/weed/glog"
- "k8s.io/utils/mount"
+ "k8s.io/mount-utils"
)
// Config holds values to configure the driver
@@ -79,7 +79,7 @@ func fuseMount(path string, command string, args []string) (Unmounter, error) {
// make sure we'll have no stale mounts
time.Sleep(time.Millisecond * 100)
- _ = mount.New("").Unmount(path)
+ _ = mountutil.Unmount(path)
close(fu.finished)
}()
@@ -122,10 +122,8 @@ func (fu *fuseUnmounter) waitFinished(timeout time.Duration) error {
}
func (fu *fuseUnmounter) Unmount() error {
- m := mount.New("")
-
- if ok, err := m.IsLikelyNotMountPoint(fu.path); !ok || mount.IsCorruptedMnt(err) {
- if err := m.Unmount(fu.path); err != nil {
+ if ok, err := mountutil.IsLikelyNotMountPoint(fu.path); !ok || mount.IsCorruptedMnt(err) {
+ if err := mountutil.Unmount(fu.path); err != nil {
return err
}
}