From 8a9cd6d676728792aaee31f30015d284acd154a3 Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Wed, 10 Aug 2005 11:14:39 -0500 Subject: JFS: Fix race in txLock TxAnchor.anon_list is protected by jfsTxnLock (TXN_LOCK), but there was a place in txLock() that was removing an entry from the list without holding the spinlock. Signed-off-by: Dave Kleikamp --- fs/jfs/jfs_txnmgr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/jfs/jfs_txnmgr.c') diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 3555acff12d..c7a92f9deb2 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -657,7 +657,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, /* only anonymous txn. * Remove from anon_list */ + TXN_LOCK(); list_del_init(&jfs_ip->anon_inode_list); + TXN_UNLOCK(); } jfs_ip->atlhead = tlck->next; } else { -- cgit v1.2.3