public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: LKML <linux-kernel@vger.kernel.org>, vs <vs@thebsh.namesys.com>,
	Andrew Morton <akpm@osdl.org>
Subject: [Fwd: [PATCH 5/8] reiser4-lock-ordering-fix.patch]
Date: Wed, 16 Nov 2005 00:57:18 -0800	[thread overview]
Message-ID: <437AF46E.70400@namesys.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: [PATCH 5/8] reiser4-lock-ordering-fix.patch --]
[-- Type: message/rfc822, Size: 2053 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 2 bytes --]

.

[-- Attachment #2.1.2: reiser4-lock-ordering-fix.patch --]
[-- Type: text/plain, Size: 775 bytes --]


From: Alex Zarochentsev <zam@namesys.com>

This patch fixes broken lock ordering.

Signed-off-by: Vladimir V. Saveliev <vs@namesys.com>


 fs/reiser4/txnmgr.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN fs/reiser4/txnmgr.c~reiser4-lock-ordering-fix fs/reiser4/txnmgr.c
--- linux-2.6.14-mm2/fs/reiser4/txnmgr.c~reiser4-lock-ordering-fix	2005-11-15 17:18:42.000000000 +0300
+++ linux-2.6.14-mm2-vs/fs/reiser4/txnmgr.c	2005-11-15 17:18:42.000000000 +0300
@@ -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;
 		}

_

                 reply	other threads:[~2005-11-16  8:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437AF46E.70400@namesys.com \
    --to=reiser@namesys.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vs@thebsh.namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox