All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: NeilBrown <neil@brown.name>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: fs/dcache.c: bogus comment re LIST_POISON2 around __d_drop()
Date: Mon, 6 Apr 2026 05:05:30 +0100	[thread overview]
Message-ID: <20260406040530.GX3836593@ZenIV> (raw)
In-Reply-To: <177544136061.1474915.4475662411738222301@noble.neil.brown.name>

On Mon, Apr 06, 2026 at 12:09:20PM +1000, NeilBrown wrote:

> It might be help to add *why* it doesn't.  Presumably this is an
> optimisation for when the dentry will soon be added into a different
> list.  There is no point setting pprev when it will soon be set to
> something else while the lock is still held.
> Do we know that the compiler won't work out this optimisation itself?

Er...  Neil, it was your patch in the first place ;-)  I realize that this
was over 8 years ago; for context see 61647823aa92.  The short version of
the story: we want to avoid a window during d_move() when d_unhashed()
(actually, d_unlinked()) called without ->d_lock would give false
positives.

  reply	other threads:[~2026-04-06  4:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-05 19:04 fs/dcache.c: bogus comment re LIST_POISON2 around __d_drop() Al Viro
2026-04-06  2:09 ` NeilBrown
2026-04-06  4:05   ` Al Viro [this message]
2026-04-06  5:47     ` NeilBrown

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=20260406040530.GX3836593@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=neil@brown.name \
    /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.