From c7e5c39191ce7bc31ac4e532fc3a03929196a0cc Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Sun, 4 Jul 1999 06:16:29 +0000 Subject: [PATCH] Don't permanently lose the async bit on an failed unmount --- sys/kern/vfs_syscalls.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index fbf107374555..81437964888c 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.139 1999/07/01 18:58:16 wrstuden Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.140 1999/07/04 06:16:29 sommerfeld Exp $ */ /* * Copyright (c) 1989, 1993 @@ -457,6 +457,7 @@ dounmount(mp, flags, p) { struct vnode *coveredvp; int error; + int async; simple_lock(&mountlist_slock); mp->mnt_flag |= MNT_UNMOUNT; @@ -464,6 +465,7 @@ dounmount(mp, flags, p) lockmgr(&mp->mnt_lock, LK_DRAIN | LK_INTERLOCK, &mountlist_slock); if (mp->mnt_flag & MNT_EXPUBLIC) vfs_setpublicfs(NULL, NULL, NULL); + async = mp->mnt_flag & ASYNC; mp->mnt_flag &=~ MNT_ASYNC; cache_purgevfs(mp); /* remove cache entries for this file sys */ if (((mp->mnt_flag & MNT_RDONLY) || @@ -473,6 +475,7 @@ dounmount(mp, flags, p) simple_lock(&mountlist_slock); if (error) { mp->mnt_flag &= ~MNT_UNMOUNT; + mp->mnt_flag |= async; lockmgr(&mp->mnt_lock, LK_RELEASE | LK_INTERLOCK | LK_REENABLE, &mountlist_slock); if (mp->mnt_flag & MNT_MWAIT)