[Jfs-patches] [PATCH] Fix hang in txLock (9 of 12)
Brought to you by:
blaschke-oss,
shaggyk
From: <sh...@au...> - 2005-03-31 20:50:39
|
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/25 11:27:34-06:00 sh...@au... # JFS: Fix hang in txLock # # Make sure tlock is still locking mp before sleeping in txLock # # Signed-off-by: Dave Kleikamp <sh...@au...> # diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c 2005-03-31 14:18:55 -06:00 +++ b/fs/jfs/jfs_txnmgr.c 2005-03-31 14:18:55 -06:00 @@ -227,6 +227,7 @@ static void txLockFree(lid_t lid) { + TxLock[lid].tid = 0; TxLock[lid].next = TxAnchor.freelock; TxAnchor.freelock = lid; TxAnchor.tlocksInUse--; @@ -856,7 +857,7 @@ jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d", tid, xtid, lid); - if (xtid) + if (xtid && (tlck->mp == mp)) TXN_SLEEP_DROP_LOCK(&tid_to_tblock(xtid)->waitor); else TXN_UNLOCK(); |