File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -240,16 +240,19 @@ func (r *FuseRecover) lazyUnmountIfNeeded(mountPath string) {
240240 // FUSE restart leaves stale mounts. Normal unmount may fail or block.
241241 // Lazy unmount prevents stack piling and cleans up /dev/fuse references.
242242
243- mounter := mount . New ( "" )
244-
245- // Use CleanupMountPoint which handles corrupted mounts and lazy unmount (force=true) .
246- if err := mount .CleanupMountPoint (mountPath , mounter , true ); err != nil {
243+ // Use CleanupMountPoint with extensiveMountPointCheck=true, which relies on
244+ // IsNotMountPoint instead of IsLikelyNotMountPoint and properly handles
245+ // bind mounts and corrupted mount points during cleanup .
246+ if err := mount .CleanupMountPoint (mountPath , r . Interface , true ); err != nil {
247247 glog .Warningf ("FuseRecovery: failed to cleanup mount %s: %v" , mountPath , err )
248248 }
249249
250250 // Wait briefly until the mount is released by the kernel.
251251 err := wait .Poll (500 * time .Millisecond , 2 * time .Second , func () (bool , error ) {
252- notMnt , err := mounter .IsLikelyNotMountPoint (mountPath )
252+ notMnt , err := r .Interface .IsLikelyNotMountPoint (mountPath )
253+ if os .IsNotExist (err ) {
254+ return true , nil
255+ }
253256 return err == nil && notMnt , nil
254257 })
255258 if err != nil {
You can’t perform that action at this time.
0 commit comments