Skip to content

Commit 657ab0c

Browse files
authored
Merge pull request #322 from andyzhangx/extensiveMountPointCheck
fix: unmount failure due to incorrect mount path check
2 parents 29a07ac + 39ab8a8 commit 657ab0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/smb/nodeserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish
105105
}
106106

107107
klog.V(2).Infof("NodeUnpublishVolume: unmounting volume %s on %s", volumeID, targetPath)
108-
err := CleanupSMBMountPoint(d.mounter, targetPath, false)
108+
err := CleanupSMBMountPoint(d.mounter, targetPath, true /*extensiveMountPointCheck*/)
109109
if err != nil {
110110
return nil, status.Errorf(codes.Internal, "failed to unmount target %q: %v", targetPath, err)
111111
}
@@ -225,7 +225,7 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu
225225
defer d.volumeLocks.Release(volumeID)
226226

227227
klog.V(2).Infof("NodeUnstageVolume: CleanupMountPoint on %s with volume %s", stagingTargetPath, volumeID)
228-
if err := CleanupSMBMountPoint(d.mounter, stagingTargetPath, false); err != nil {
228+
if err := CleanupSMBMountPoint(d.mounter, stagingTargetPath, true /*extensiveMountPointCheck*/); err != nil {
229229
return nil, status.Errorf(codes.Internal, "failed to unmount staging target %q: %v", stagingTargetPath, err)
230230
}
231231

0 commit comments

Comments
 (0)