summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs/smbfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index f64c125..904835c 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -304,6 +304,9 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
if (error)
return error;
smb_makescred(&scred, td, td->td_ucred);
+ error = smb_share_lock(smp->sm_share, LK_EXCLUSIVE, td);
+ if (error)
+ return error;
smb_share_put(smp->sm_share, &scred);
mp->mnt_data = (qaddr_t)0;
OpenPOWER on IntegriCloud