1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

Don't restore MNT_QUOTA bit in mnt_flag after snapshot creation,

closing a race between nmount() and quotactl().
This commit is contained in:
Tor Egge 2006-09-26 04:19:11 +00:00
parent fba924ce9b
commit 9b65c22cf4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162652

View File

@ -832,7 +832,7 @@ ffs_snapshot(mp, snapfile)
}
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);