Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs VOP_LOCK drops the interlock; pick it up again t...



details:   https://anonhg.NetBSD.org/src/rev/014bae202b0e
branches:  trunk
changeset: 581028:014bae202b0e
user:      perseant <perseant%NetBSD.org@localhost>
date:      Fri May 20 19:09:25 2005 +0000

description:
VOP_LOCK drops the interlock; pick it up again to avoid an "already unlocked"
panic in lfs_putpages.

diffstat:

 sys/ufs/lfs/lfs_vnops.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9a34253512fb -r 014bae202b0e sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Fri May 20 19:03:11 2005 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Fri May 20 19:09:25 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vnops.c,v 1.150 2005/04/27 20:35:10 perseant Exp $ */
+/*     $NetBSD: lfs_vnops.c,v 1.151 2005/05/20 19:09:25 perseant Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.150 2005/04/27 20:35:10 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.151 2005/05/20 19:09:25 perseant Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1811,8 +1811,10 @@
                simple_unlock(&fs->lfs_interlock);
 
                simple_lock(&vp->v_interlock);
-               if (locked)
+               if (locked) {
                        VOP_LOCK(vp, LK_EXCLUSIVE | LK_INTERLOCK);
+                       simple_lock(&vp->v_interlock);
+               }
                lfs_writer_leave(fs);
 
                /* XXX the flush should have taken care of this one too! */



Home | Main Index | Thread Index | Old Index