summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1998-12-12 21:07:09 +0000
committerdillon <dillon@FreeBSD.org>1998-12-12 21:07:09 +0000
commit127655f6ddbdc440718336f96821295020e660e5 (patch)
tree6058a8e0fd71cd015d75d2d5bd971e1d86d7f8fe /sys/kern
parent4a5ab955ca5be11c420646ad76e13e55113ada02 (diff)
downloadFreeBSD-src-127655f6ddbdc440718336f96821295020e660e5.zip
FreeBSD-src-127655f6ddbdc440718336f96821295020e660e5.tar.gz
PR: kern/8965
Obtained from: Stephen Clawson <sclawson@cs.utah.edu> Wakeup anyone waiting on a mount point prior to returning from umount, whether an error occurs or not. Fixes a stat/NFS-umount race and other potential future problems. Fix taken from bug/pr which also indicated that the same fix has already been applied to OpenBSD and NetBSD.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_extattr.c4
-rw-r--r--sys/kern/vfs_syscalls.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 1482df6..5f2b992 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.109 1998/11/03 08:01:47 peter Exp $
+ * $Id: vfs_syscalls.c,v 1.110 1998/11/03 14:29:09 peter Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -494,6 +494,8 @@ dounmount(mp, flags, p)
mp->mnt_flag |= async_flag;
lockmgr(&mp->mnt_lock, LK_RELEASE | LK_INTERLOCK | LK_REENABLE,
&mountlist_slock, p);
+ if (mp->mnt_kern_flag & MNTK_MWAIT)
+ wakeup((caddr_t)mp);
return (error);
}
CIRCLEQ_REMOVE(&mountlist, mp, mnt_list);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 1482df6..5f2b992 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.109 1998/11/03 08:01:47 peter Exp $
+ * $Id: vfs_syscalls.c,v 1.110 1998/11/03 14:29:09 peter Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -494,6 +494,8 @@ dounmount(mp, flags, p)
mp->mnt_flag |= async_flag;
lockmgr(&mp->mnt_lock, LK_RELEASE | LK_INTERLOCK | LK_REENABLE,
&mountlist_slock, p);
+ if (mp->mnt_kern_flag & MNTK_MWAIT)
+ wakeup((caddr_t)mp);
return (error);
}
CIRCLEQ_REMOVE(&mountlist, mp, mnt_list);
OpenPOWER on IntegriCloud