All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Miklos Szeredi <mszeredi@suse.cz>
Subject: Re: [git pull][vfs.git] a couple of fixes
Date: Fri, 28 Sep 2012 10:08:56 -0700	[thread overview]
Message-ID: <CA+55aFwvkjsXtT31QSSLZgiu9=_51WpHLPN0UQfjUM38q_d4Hw@mail.gmail.com> (raw)
In-Reply-To: <20120928034044.GD13973@ZenIV.linux.org.uk>

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

Hmm. What is the status of the rename_lock write-lock recursion
deadlock patch from Miklos?

Attached is a simpler version of it (Miklos, can you verify this
simplified version also works for you?), but it's still fairly ugly.

            Linus

[-- Attachment #2: patch.diff --]
[-- Type: application/octet-stream, Size: 627 bytes --]

 fs/dcache.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/dcache.c b/fs/dcache.c
index 0364af2311f4..693f95bf1cae 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1134,6 +1134,8 @@ positive:
 	return 1;
 
 rename_retry:
+	if (locked)
+		goto again;
 	locked = 1;
 	write_seqlock(&rename_lock);
 	goto again;
@@ -1236,6 +1238,8 @@ out:
 rename_retry:
 	if (found)
 		return found;
+	if (locked)
+		goto again;
 	locked = 1;
 	write_seqlock(&rename_lock);
 	goto again;
@@ -3035,6 +3039,8 @@ resume:
 	return;
 
 rename_retry:
+	if (locked)
+		goto again;
 	locked = 1;
 	write_seqlock(&rename_lock);
 	goto again;

  reply	other threads:[~2012-09-28 17:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  3:40 [git pull][vfs.git] a couple of fixes Al Viro
2012-09-28 17:08 ` Linus Torvalds [this message]
2017-09-21  4:13 Al Viro
2017-09-21 15:59 ` Linus Torvalds
2017-09-21 16:36   ` Al Viro
2022-11-25  3:52 [git pull] (vfs.git) " Al Viro
2022-11-25 18:22 ` pr-tracker-bot

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='CA+55aFwvkjsXtT31QSSLZgiu9=_51WpHLPN0UQfjUM38q_d4Hw@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mszeredi@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.