Don't restore MNT_QUOTA bit in mnt_flag after a failed mount with

MNT_UPDATE flag, closing a race between nmount() and quotactl().
This commit is contained in:
Tor Egge 2006-09-26 04:18:36 +00:00
parent 55b4ff0d9f
commit fba924ce9b

View File

@ -982,7 +982,8 @@ vfs_domount(
mp->mnt_flag &=
~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE | MNT_SNAPSHOT);
if (error)
mp->mnt_flag = flag;
mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) |
(flag & ~MNT_QUOTA);
if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0)
mp->mnt_kern_flag |= MNTK_ASYNC;
else