Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs Also check if root vnode is busy wh...



details:   https://anonhg.NetBSD.org/src/rev/474754361448
branches:  trunk
changeset: 789047:474754361448
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Aug 05 11:48:22 2013 +0000

description:
Also check if root vnode is busy when unmounting.

diffstat:

 sys/rump/librump/rumpvfs/rumpfs.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 25ff50f3b916 -r 474754361448 sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Mon Aug 05 11:14:00 2013 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Mon Aug 05 11:48:22 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfs.c,v 1.119 2013/08/05 11:14:00 pooka Exp $       */
+/*     $NetBSD: rumpfs.c,v 1.120 2013/08/05 11:48:22 pooka Exp $       */
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.119 2013/08/05 11:14:00 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.120 2013/08/05 11:48:22 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -1808,9 +1808,12 @@
        if (panicstr || mntflags & MNT_FORCE)
                flags |= FORCECLOSE;
 
+       if (rfsmp->rfsmp_rvp->v_usecount > 1 && (flags & FORCECLOSE) == 0)
+               return EBUSY;
+
        if ((error = vflush(mp, rfsmp->rfsmp_rvp, flags)) != 0)
                return error;
-       vgone(rfsmp->rfsmp_rvp); /* XXX */
+       vgone(rfsmp->rfsmp_rvp);
 
        kmem_free(rfsmp, sizeof(*rfsmp));
 



Home | Main Index | Thread Index | Old Index