summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-09-12 16:31:32 +0000
committerkib <kib@FreeBSD.org>2007-09-12 16:31:32 +0000
commite651705b7e9100bab6eada7793ec8c47c24d65aa (patch)
tree9af9fa02ecb42b6b92fe2fefa1fb1be0c3c57232 /sys/kern/vfs_subr.c
parentea3192c3f4d2f82afb6215fb244df50276cd3558 (diff)
downloadFreeBSD-src-e651705b7e9100bab6eada7793ec8c47c24d65aa.zip
FreeBSD-src-e651705b7e9100bab6eada7793ec8c47c24d65aa.tar.gz
When restoring the mount after umount failed, the MNTK_UNMOUNT flag
prevents insmntque() from placing reallocated syncer vnode on mount list, that causes panic in vfs_allocate_syncvnode(). Introduce MNTK_NOINSMNTQ flag, that marks the period when instmntque is not allowed to success, instead of MNTK_UNMOUNT. The MNTK_NOINSMNTQ is set and cleared simultaneously with MNTK_UNMOUNT, except on umount error path, where it is cleaned just before the syncer vnode is going to be allocated. Reported by: Peter Jeremy <peterjeremy optushome com au> Suggested by: tegge Approved by: re (rwatson)
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index c825eb6..9c168d7 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1021,7 +1021,7 @@ insmntque1(struct vnode *vp, struct mount *mp,
("insmntque: vnode already on per mount vnode list"));
VNASSERT(mp != NULL, vp, ("Don't call insmntque(foo, NULL)"));
MNT_ILOCK(mp);
- if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 &&
+ if ((mp->mnt_kern_flag & MNTK_NOINSMNTQ) != 0 &&
mp->mnt_nvnodelistsize == 0) {
MNT_IUNLOCK(mp);
if (dtr != NULL)
OpenPOWER on IntegriCloud