diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-06 20:52:15 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-06 20:52:15 +0000 |
commit | c976321cec6869514347c8c44cf64c20e79a0698 (patch) | |
tree | b2e406cd1be1d738e25d001277cb8d7f2d471691 /sys/ufs/mfs | |
parent | ea2a254842c844fb2a2272dc2da859fe0959d418 (diff) |
attempt to put a process's cwd back in place after a forced umount.
won't always work, but it's the best we can do for now. this covers
at least some of the failure cases the previous commit to vfs_lookup.c
checks for.
ok weingart@
Diffstat (limited to 'sys/ufs/mfs')
-rw-r--r-- | sys/ufs/mfs/mfs_vfsops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index e9e6a7013e8..f02d061e52d 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.22 2002/07/12 14:02:23 art Exp $ */ +/* $OpenBSD: mfs_vfsops.c,v 1.23 2003/05/06 20:52:14 tedu Exp $ */ /* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */ /* @@ -259,6 +259,7 @@ mfs_start(mp, flags, p) struct proc *p; { struct vnode *vp = VFSTOUFS(mp)->um_devvp; + struct vnode *rvp; struct mfsnode *mfsp = VTOMFS(vp); struct buf *bp; caddr_t base; @@ -278,8 +279,12 @@ mfs_start(mp, flags, p) * EINTR/ERESTART. */ if (sleepreturn != 0) { + if (ufs_root(mp, &rvp)) + rvp = NULL; + else + vput(rvp); if (vfs_busy(mp, LK_EXCLUSIVE|LK_NOWAIT, NULL, p) || - dounmount(mp, 0, p)) + dounmount(mp, 0, p, rvp)) CLRSIG(p, CURSIG(p)); sleepreturn = 0; continue; |