diff options
author | tegge <tegge@FreeBSD.org> | 1998-05-17 19:38:55 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-05-17 19:38:55 +0000 |
commit | 93d053207efe728ba9e248f6d7df271fe9f512ff (patch) | |
tree | 43e5307975f90939b0873757d9721996f4d638ab | |
parent | 0b804fd802fa866bc646c551c2012840ac87da5a (diff) | |
download | FreeBSD-src-93d053207efe728ba9e248f6d7df271fe9f512ff.zip FreeBSD-src-93d053207efe728ba9e248f6d7df271fe9f512ff.tar.gz |
Supply the correct process argument to dounmount when possible.
-rw-r--r-- | sys/kern/vfs_export.c | 8 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 5e6386e..7edf44a 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.151 1998/04/18 06:26:16 peter Exp $ + * $Id: vfs_subr.c,v 1.152 1998/04/19 23:32:03 julian Exp $ */ /* @@ -2149,9 +2149,13 @@ void vfs_unmountall() { struct mount *mp, *nmp; - struct proc *p = initproc; /* XXX XXX should this be proc0? */ + struct proc *p; int error; + if (curproc != NULL) + p = curproc; + else + p = initproc; /* XXX XXX should this be proc0? */ /* * Since this only runs when rebooting, it is not interlocked. */ diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 5e6386e..7edf44a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.151 1998/04/18 06:26:16 peter Exp $ + * $Id: vfs_subr.c,v 1.152 1998/04/19 23:32:03 julian Exp $ */ /* @@ -2149,9 +2149,13 @@ void vfs_unmountall() { struct mount *mp, *nmp; - struct proc *p = initproc; /* XXX XXX should this be proc0? */ + struct proc *p; int error; + if (curproc != NULL) + p = curproc; + else + p = initproc; /* XXX XXX should this be proc0? */ /* * Since this only runs when rebooting, it is not interlocked. */ |