Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs Other half of the ufs_hashlock locking fix (oops)



details:   https://anonhg.NetBSD.org/src/rev/4bf84f1c30ed
branches:  trunk
changeset: 471970:4bf84f1c30ed
user:      perseant <perseant%NetBSD.org@localhost>
date:      Fri Apr 16 16:23:46 1999 +0000

description:
Other half of the ufs_hashlock locking fix (oops)

diffstat:

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

diffs (19 lines):

diff -r c74340c871a0 -r 4bf84f1c30ed sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c   Fri Apr 16 16:08:28 1999 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c   Fri Apr 16 16:23:46 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_alloc.c,v 1.20 1999/04/16 00:41:58 perseant Exp $  */
+/*     $NetBSD: lfs_alloc.c,v 1.21 1999/04/16 16:23:46 perseant Exp $  */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -360,7 +360,8 @@
                sup->su_nbytes -= DINODE_SIZE;
                (void) VOP_BWRITE(bp);
        }
-       lockmgr(&ufs_hashlock, LK_RELEASE, 0);
+       if(!already_locked)
+               lockmgr(&ufs_hashlock, LK_RELEASE, 0);
        
        /* Set superblock modified bit and decrement file count. */
        fs->lfs_fmod = 1;



Home | Main Index | Thread Index | Old Index