DragonFly bugs List (threaded) for 2008-09
DragonFly BSD
DragonFly bugs List (threaded) for 2008-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

HAMMER: panic: lockmgr: locking against myself (patch #3)


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Sep 2008 13:10:40 -0700 (PDT)

    Oops, I blew it.  Don't patch hammer_object.c ... revert that
    to what was there before.  The original code was correct.

    hammer_io.c does need to be patched.  Here's the revised patch
    (without hammer_object.c patched).

					-Matt


Index: hammer_io.c
===================================================================
RCS file: /cvs/src/sys/vfs/hammer/hammer_io.c,v
retrieving revision 1.54
diff -u -p -r1.54 hammer_io.c
--- hammer_io.c	29 Aug 2008 20:19:08 -0000	1.54
+++ hammer_io.c	13 Sep 2008 18:12:34 -0000
@@ -277,17 +277,19 @@ hammer_io_inval(hammer_volume_t volume, 
 		hammer_ref(&iou->io.lock);
 		hammer_io_clear_modify(&iou->io, 1);
 		bundirty(bp);
+		iou->io.released = 0;
+		BUF_KERNPROC(bp);
 		iou->io.reclaim = 1;
 		iou->io.waitdep = 1;
-		KKASSERT(iou->io.lock.refs == 0);
+		KKASSERT(iou->io.lock.refs == 1);
 		hammer_rel_buffer(&iou->buffer, 0);
 		/*hammer_io_deallocate(bp);*/
 	} else {
 		KKASSERT((bp->b_flags & B_LOCKED) == 0);
 		bundirty(bp);
 		bp->b_flags |= B_NOCACHE|B_RELBUF;
+		brelse(bp);
 	}
-	brelse(bp);
 	crit_exit();
 }
 



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