summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-05-03 21:19:54 +0000
committerjoerg <joerg@FreeBSD.org>1997-05-03 21:19:54 +0000
commitff12d1d1773aae3e2ba252b0daa09e91d35e57c1 (patch)
treeb74399fecd909b765b05f181dee249cc2fbae516 /sys/miscfs
parent97edcdf2f7e8f7cd5dc81bd510475b99b2df57ea (diff)
downloadFreeBSD-src-ff12d1d1773aae3e2ba252b0daa09e91d35e57c1.zip
FreeBSD-src-ff12d1d1773aae3e2ba252b0daa09e91d35e57c1.tar.gz
Fix the umount problems for DEVFS.
PR: 3276 & 3469 (the fixes), 2738, 2033 (reports) Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/devfs/devfs_tree.c8
-rw-r--r--sys/miscfs/devfs/devfs_vfsops.c13
2 files changed, 17 insertions, 4 deletions
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c
index 784f23b..c4b507e 100644
--- a/sys/miscfs/devfs/devfs_tree.c
+++ b/sys/miscfs/devfs/devfs_tree.c
@@ -2,7 +2,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.34 1997/02/12 16:19:04 mpp Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.35 1997/04/10 14:35:18 bde Exp $
*/
#include "opt_devfs.h"
@@ -496,6 +496,12 @@ devfs_dn_free(dn_p dnp)
if(--dnp->links <= 0 ) /* can be -1 for initial free, on error */
{
/*probably need to do other cleanups XXX */
+ if (dnp->nextsibling != dnp) {
+ dn_p* prevp = dnp->prevsiblingp;
+ *prevp = dnp->nextsibling;
+ dnp->nextsibling->prevsiblingp = prevp;
+
+ }
if(dnp->type == DEV_SLNK) {
free(dnp->by.Slnk.name,M_DEVFSNODE);
}
diff --git a/sys/miscfs/devfs/devfs_vfsops.c b/sys/miscfs/devfs/devfs_vfsops.c
index a05a5fe..8e0114d 100644
--- a/sys/miscfs/devfs/devfs_vfsops.c
+++ b/sys/miscfs/devfs/devfs_vfsops.c
@@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.15 1996/11/21 07:18:58 julian Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.16 1997/02/12 16:19:08 mpp Exp $
*
*
*/
@@ -139,13 +139,20 @@ DBPRINT(("start "));
/*
* Unmount the filesystem described by mp.
- * Note: vnodes from this FS may hang around if being used..
- * This should not be a problem, they should be self contained.
*/
static int
devfs_unmount( struct mount *mp, int mntflags, struct proc *p)
{
struct devfsmount *devfs_mp_p = (struct devfsmount *)mp->mnt_data;
+ int flags = 0;
+ int error;
+
+ if (mntflags & MNT_FORCE) {
+ flags |= FORCECLOSE;
+ }
+ error = vflush(mp, NULLVP, flags);
+ if (error)
+ return error;
DBPRINT(("unmount "));
devfs_free_plane(devfs_mp_p);
OpenPOWER on IntegriCloud