diff options
author | tegge <tegge@FreeBSD.org> | 2006-09-26 04:12:49 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-09-26 04:12:49 +0000 |
commit | 83154f853d9ca39deb1add01e032aff1f0678514 (patch) | |
tree | ac46e0b5a80f88127d3d14dc940a5f2746573c00 /sys/fs/smbfs/smbfs_vfsops.c | |
parent | d7fe3e736512a1dd37a985037184eecf7df1f26d (diff) | |
download | FreeBSD-src-83154f853d9ca39deb1add01e032aff1f0678514.zip FreeBSD-src-83154f853d9ca39deb1add01e032aff1f0678514.tar.gz |
Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.
This eliminates a race where MNT_UPDATE flag could be lost when nmount()
raced against sync(), sync_fsync() or quotactl().
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index 904835c..182ba2b 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -318,7 +318,9 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td) #else free(smp, M_SMBFSDATA); #endif + MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; + MNT_IUNLOCK(mp); return error; } |