Thread (101 messages) 101 messages, 14 authors, 2025-11-25

Re: [PATCH v2 06/50] primitives for maintaining persisitency

From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: 2025-10-28 12:38:02
Also in: bpf, linux-efi, linux-fsdevel, linux-mm, linux-usb, ocfs2-devel, selinux

On Tue, 2025-10-28 at 00:45 +0000, Al Viro wrote:
[...]
+void d_make_discardable(struct dentry *dentry)
+{
+	spin_lock(&dentry->d_lock);
+	dentry->d_flags &= ~DCACHE_PERSISTENT;
+	dentry->d_lockref.count--;
+	rcu_read_lock();
+	finish_dput(dentry);
+}
+EXPORT_SYMBOL(d_make_discardable);
I was going to ask why you don't have a WARN_ON if the dentry is not
persistent here.  Fortunately I read the next patch which gives the
explanation and saw that you do do this in patch 50.  For those of us
who have a very linear way of reading and responding to patches, it
would have been helpful to put a comment at the top saying something
like persistency will be checked when all callers are converted, which
you can replace in patch 50.

Regards,

James

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help