Re: [GIT PULL] fuse update for 6.19

From: Al Viro

Date: Fri Dec 05 2025 - 21:28:08 EST


On Fri, Dec 05, 2025 at 05:52:51PM -0800, Linus Torvalds wrote:
> On Fri, 5 Dec 2025 at 17:42, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Far more interesting question, IMO, is what's to prevent memory
> > pressure from evicting the damn argument right under us.
>
> That was my first reaction, but look at the 'fuse_dentry_prune()' logic.
>
> So if the dentry is removed by the VFS layer, it should be removed here too.

Sure, ->d_prune() would take it out of the rbtree, but what if it hits
rb_erase(&fd->node, &dentry_hash[i].tree);
RB_CLEAR_NODE(&fd->node);
spin_unlock(&dentry_hash[i].lock);
... right here, when we are not holding any locks anymore?
d_dispose_if_unused(fd->dentry, &dispose);
cond_resched();
spin_lock(&dentry_hash[i].lock);