Skip to contentSkip to conversation

reiser4-lock-ordering-fix.patch]

PATCH New Hans Reiser 1 participant 1 message Nov 16, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 reiser4-lock-ordering-fix.patch]

.

From: Alex Zarochentsev <[email protected]>

This patch fixes broken lock ordering.

 fs/reiser4/txnmgr.c |    2 ++
 1 files changed, 2 insertions(+)
fs/reiser4/txnmgr.c renamed from fs/reiser4/txnmgr.c~reiser4-lock-ordering-fix +2 -0
diff -puN fs/reiser4/txnmgr.c~reiser4-lock-ordering-fix fs/reiser4/txnmgr.c
@@ -2256,7 +2256,9 @@ static void fuse_not_fused_lock_owners(t
 			spin_lock_atom(atomh);
 		}
 		if (atomh == atomf || !atom_isopen(atomh) || !atom_isopen(atomf)) {
+			spin_unlock_atom(atomf);
 			atom_dec_and_unlock(atomh);
+			spin_lock_atom(atomf);
 			atom_dec_and_unlock(atomf);
 			goto repeat;
 		}

_