[PATCH] Fix hang in txLock (9 of 12)
[email protected] (Dave Kleikamp) Thu, 31 Mar 2005 14:50:05 -0600 (CST)
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/25 11:27:34-06:00 [email protected] # JFS: Fix hang in txLock # # Make sure tlock is still locking mp before sleeping in txLock # # Signed-off-by: Dave Kleikamp <[email protected]> # 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(); ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/info/Sentarus/hamr30