summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-09-26 04:19:11 +0000
committertegge <tegge@FreeBSD.org>2006-09-26 04:19:11 +0000
commit34ea634be74b46f8326b06761eb1e444957160ad (patch)
treee9bab20e118499ff1c4577564930a58766b7bc92 /sys/ufs/ffs
parenta802c35eb4beea451e9fea598128fb06b96e1aae (diff)
downloadFreeBSD-src-34ea634be74b46f8326b06761eb1e444957160ad.zip
FreeBSD-src-34ea634be74b46f8326b06761eb1e444957160ad.tar.gz
Don't restore MNT_QUOTA bit in mnt_flag after snapshot creation,
closing a race between nmount() and quotactl().
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index f23f098..473dbfd 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -832,7 +832,7 @@ out:
}
UFS_UNLOCK(ump);
MNT_ILOCK(mp);
- mp->mnt_flag = flag;
+ mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA);
MNT_IUNLOCK(mp);
if (error)
(void) ffs_truncate(vp, (off_t)0, 0, NOCRED, td);
OpenPOWER on IntegriCloud