diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-10-15 15:16:14 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-10-15 15:16:14 +0000 |
commit | bde6e1edda10801e7936d02518b58f27ecd1864b (patch) | |
tree | eb9976eff779d8c15cbfff8f94f69e6c540eff7b /sys | |
parent | f8004b12d445e78c4dccfe1063d2f77271db3693 (diff) |
Yet another unmount/kill race. (I hate this)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/mfs/mfs_vfsops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index ad415f35cf5..36989eab1fb 100644 --- a/sys/ufs/mfs/mfs_vfsops.c +++ b/sys/ufs/mfs/mfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfs_vfsops.c,v 1.9 1999/09/03 18:18:16 art Exp $ */ +/* $OpenBSD: mfs_vfsops.c,v 1.10 1999/10/15 15:16:13 art Exp $ */ /* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */ /* @@ -322,7 +322,13 @@ mfs_dounmount1(v) { struct mount *mp = v; - dounmount(mp, 0, curproc); + /* + * Don't try to do the unmount if someone else is trying to do that. + * XXX - should be done with vfs_busy, but the problem is that + * we can't pass a locked mp into dounmount. + */ + if (!(mp->mnt_flag & MNT_UNMOUNT)) + dounmount(mp, 0, curproc); kthread_exit(0); } |