public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* fs/dcache.c: bogus comment re LIST_POISON2 around __d_drop()
@ 2026-04-05 19:04 Al Viro
  2026-04-06  2:09 ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2026-04-05 19:04 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: NeilBrown

[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)
 {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-06  5:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-04-06  5:47     ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox