diff options
author | tegge <tegge@FreeBSD.org> | 2006-09-26 04:18:36 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-09-26 04:18:36 +0000 |
commit | a802c35eb4beea451e9fea598128fb06b96e1aae (patch) | |
tree | 0c89e0ee3d3547fa81f7f763e64fc662ab62b32d /sys | |
parent | 431fd40aef7a0cbbc5403ac5789a600591395339 (diff) | |
download | FreeBSD-src-a802c35eb4beea451e9fea598128fb06b96e1aae.zip FreeBSD-src-a802c35eb4beea451e9fea598128fb06b96e1aae.tar.gz |
Don't restore MNT_QUOTA bit in mnt_flag after a failed mount with
MNT_UPDATE flag, closing a race between nmount() and quotactl().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_mount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index db40943..543f7e4 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -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 |