Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/miscfs/union pull up rev 1.36 from trunk (requested...



details:   https://anonhg.NetBSD.org/src/rev/9a91aec02eb2
branches:  netbsd-1-4
changeset: 469594:9a91aec02eb2
user:      cgd <cgd%NetBSD.org@localhost>
date:      Mon Oct 18 05:05:19 1999 +0000

description:
pull up rev 1.36 from trunk (requested by wrstuden):
  In spec_close(), call the device's close routine with the vnode
  unlocked if the call might block. Force a non-blocking close if
  VXLOCK is set.  This eliminates a potential deadlock situation, and
  should eliminate the dirty buffers on reboot issue.

diffstat:

 sys/miscfs/union/union_subr.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 1aa650315e91 -r 9a91aec02eb2 sys/miscfs/union/union_subr.c
--- a/sys/miscfs/union/union_subr.c     Mon Oct 18 05:05:14 1999 +0000
+++ b/sys/miscfs/union/union_subr.c     Mon Oct 18 05:05:19 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: union_subr.c,v 1.30 1999/03/24 05:53:59 sommerfe Exp $ */
+/*     $NetBSD: union_subr.c,v 1.30.2.1 1999/10/18 05:05:19 cgd Exp $  */
 
 /*
  * Copyright (c) 1994 Jan-Simon Pendry
@@ -694,11 +694,13 @@
        if (error == 0) {
                int i;
 
+               vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
                for (i = 0; i < un->un_openl; i++) {
                        (void) VOP_CLOSE(lvp, FREAD, cred, p);
                        (void) VOP_OPEN(uvp, FREAD, cred, p);
                }
                un->un_openl = 0;
+               VOP_UNLOCK(lvp, 0);
        }
 
        return (error);



Home | Main Index | Thread Index | Old Index