From 83154f853d9ca39deb1add01e032aff1f0678514 Mon Sep 17 00:00:00 2001 From: tegge Date: Tue, 26 Sep 2006 04:12:49 +0000 Subject: 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(). --- sys/fs/smbfs/smbfs_vfsops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/fs/smbfs') 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; } -- cgit v1.1