Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs This should fix a deadlock.



details:   https://anonhg.NetBSD.org/src/rev/b29bd42e7f2f
branches:  trunk
changeset: 749107:b29bd42e7f2f
user:      eeh <eeh%NetBSD.org@localhost>
date:      Tue Nov 17 22:49:24 2009 +0000

description:
This should fix a deadlock.

diffstat:

 sys/ufs/lfs/lfs_vnops.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 3ec1ce4081f7 -r b29bd42e7f2f sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Tue Nov 17 22:35:43 2009 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Tue Nov 17 22:49:24 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vnops.c,v 1.224 2009/11/05 11:54:49 pooka Exp $    */
+/*     $NetBSD: lfs_vnops.c,v 1.225 2009/11/17 22:49:24 eeh Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.224 2009/11/05 11:54:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.225 2009/11/17 22:49:24 eeh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -2286,8 +2286,10 @@
                        mutex_enter(&vp->v_interlock);
                        write_and_wait(fs, vp, busypg, seglocked, NULL);
                        if (!seglocked) {
+                               mutex_exit(&vp->v_interlock);
                                lfs_release_finfo(fs);
                                lfs_segunlock(fs);
+                               mutex_enter(&vp->v_interlock);
                        }
                        sp->vp = NULL;
                        goto get_seglock;



Home | Main Index | Thread Index | Old Index