aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-04-03 00:44:56 -0700
committerGitHub <noreply@github.com>2022-04-03 00:44:56 -0700
commitbf8fbaf3ac6a036c25a56266f8a82ac785d61e9e (patch)
tree7a2b38c4f77dbf2852cddd80141a133c72f32f05 /pkg
parent937a0dc33f212e86adc096188a72262b398deda8 (diff)
parent91b04a4cfb6501a49e1773641c0dca3eaa31ee72 (diff)
downloadseaweedfs-csi-driver-bf8fbaf3ac6a036c25a56266f8a82ac785d61e9e.tar.xz
seaweedfs-csi-driver-bf8fbaf3ac6a036c25a56266f8a82ac785d61e9e.zip
Merge pull request #54 from kvaster/unmount-corrupted
Check for corrupted mount before unmount
Diffstat (limited to 'pkg')
-rw-r--r--pkg/driver/mounter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/driver/mounter.go b/pkg/driver/mounter.go
index 9d4aff3..e0a6283 100644
--- a/pkg/driver/mounter.go
+++ b/pkg/driver/mounter.go
@@ -40,7 +40,7 @@ func fuseMount(path string, command string, args []string) error {
func fuseUnmount(path string) error {
m := mount.New("")
- if ok, _ := m.IsLikelyNotMountPoint(path); !ok {
+ if ok, err := m.IsLikelyNotMountPoint(path); !ok || mount.IsCorruptedMnt(err) {
if err := m.Unmount(path); err != nil {
return err
}