Re: [PATCH 0/5] seqlock: introduce SEQLOCK_READ_SECTION()
From: Oleg Nesterov
Date: Sun Oct 05 2025 - 13:41:53 EST
On 10/05, Al Viro wrote:
>
> On Sun, Oct 05, 2025 at 04:49:29PM +0200, Oleg Nesterov wrote:
>
> > static char *__dentry_path(const struct dentry *d, struct prepend_buffer *p)
> > {
> > const struct dentry *dentry;
> > struct prepend_buffer b;
> >
> > rcu_read_lock();
> > __SEQLOCK_READ_SECTION(&rename_lock, lockless, seq, NULL) {
> > dentry = d;
> > b = *p;
> > while (!IS_ROOT(dentry)) {
> > const struct dentry *parent = dentry->d_parent;
> >
> > prefetch(parent);
> > if (!prepend_name(&b, &dentry->d_name))
> > break;
> > dentry = parent;
> > }
> > if (lockless)
> > rcu_read_unlock();
>
> <cringe>
Weird or buggy?
> prepend_path() would be interesting to look at...
Yeah, I have already looked at it.
Not sure yet what the "good" cleanup could do. Will think about it more.
Oleg.