All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Cc: NeilBrown <neilb@suse.com>
Subject: fs/dcache.c: bogus comment re LIST_POISON2 around __d_drop()
Date: Sun, 5 Apr 2026 20:04:02 +0100	[thread overview]
Message-ID: <20260405190402.GV3836593@ZenIV> (raw)

[Caught while documenting ->d_hash uses]

The second line in
 * ___d_drop doesn't mark dentry as "unhashed"
 * (dentry->d_hash.pprev will be LIST_POISON2, not NULL).
is incorrect; what ___d_drop() does is
	__hlist_bl_del()
which never included poisoning - that's only done by hlist_bl_del()
and we hadn't been using that since 2011, six years prior to
___d_drop() introduction.

	I've missed that on review back then; the first line _is_
true, so functionality is all right; it's just that LIST_POISON2
reference there is confusing (and incorrect).

	For now I'm dropping the following into a local branch;
might or might not get combined with other changes in the area...

diff --git a/fs/dcache.c b/fs/dcache.c
index 0c8faeee02e2..c9995545d8d7 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -604,7 +604,7 @@ EXPORT_SYMBOL(__d_drop);
  * __d_drop requires dentry->d_lock
  *
  * ___d_drop doesn't mark dentry as "unhashed"
- * (dentry->d_hash.pprev will be LIST_POISON2, not NULL).
+ * (dentry->d_hash.pprev will not be set to NULL).
  */
 void d_drop(struct dentry *dentry)
 {

             reply	other threads:[~2026-04-05 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-05 19:04 Al Viro [this message]
2026-04-06  2:09 ` fs/dcache.c: bogus comment re LIST_POISON2 around __d_drop() NeilBrown
2026-04-06  4:05   ` Al Viro
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=20260405190402.GV3836593@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=neilb@suse.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 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.