diff options
| author | Viktor Kuzmin <kvaster@gmail.com> | 2022-04-03 10:41:26 +0300 |
|---|---|---|
| committer | Viktor Kuzmin <kvaster@gmail.com> | 2022-04-03 10:41:26 +0300 |
| commit | 91b04a4cfb6501a49e1773641c0dca3eaa31ee72 (patch) | |
| tree | 7a2b38c4f77dbf2852cddd80141a133c72f32f05 /pkg/driver | |
| parent | 937a0dc33f212e86adc096188a72262b398deda8 (diff) | |
| download | seaweedfs-csi-driver-91b04a4cfb6501a49e1773641c0dca3eaa31ee72.tar.xz seaweedfs-csi-driver-91b04a4cfb6501a49e1773641c0dca3eaa31ee72.zip | |
Check for corrupted mount before unmount
Diffstat (limited to 'pkg/driver')
| -rw-r--r-- | pkg/driver/mounter.go | 2 |
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 } |
