Subject: CVS commit: syssrc
To: None <firstname.lastname@example.org>
From: Bill Sommerfeld <email@example.com>
Date: 07/04/1999 09:20:15
Module Name: syssrc
Committed By: sommerfeld
Date: Sun Jul 4 16:20:14 UTC 1999
syssrc/sys/kern: vfs_subr.c vfs_syscalls.c
Fix kern/7906: race between unmount and getnewvnode()
mp->mnt_flags & MNT_MWAIT is replaced by mp->mnt_wcnt, and a new mount
flag MNT_GONE is created (reusing the same bit).
In insmntque(), add DIAGNOSTIC check to fail if the filesystem vnode
is being moved to is in the process of being unmounted.
getnewvnode() now protects the list of vnodes active on mp with
To avoid generating spurious errors during a doomed unmount, change
the "wait for unmount to finish" protocol between dounmount() and
vfs_busy(). In vfs_busy(), instead of only sleeping once, sleep until
either MNT_UNMOUNT is clear or MNT_GONE is set; also, maintain a count
of waiters in mp->mnt_wcnt so that dounmount() knows when it's safe to
tested by running a "while :; do mount /d1; umount -f /d1; done" loop
against multiple find(1) processes.
To generate a diff of this commit:
cvs rdiff -r1.102 -r1.103 syssrc/sys/kern/vfs_subr.c
cvs rdiff -r1.141 -r1.142 syssrc/sys/kern/vfs_syscalls.c
cvs rdiff -r1.76 -r1.77 syssrc/sys/sys/mount.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.