Re: [PATCH] vfs: keep the mount pinned while waiting for a parent delegation break

From: Al Viro

Date: Fri Oct 16 2026 - 14:31:18 EST


On Fri, Oct 16, 2026 at 05:34:21PM +0800, Zhao Gongyi wrote:
> filename_mknodat(), filename_mkdirat(), filename_symlinkat() and
> filename_rmdir() can call break_deleg_wait() on a delegated parent
> directory after dropping the struct path that pins the mount.
> try_break_deleg() only takes an inode reference, and an inode reference
> does not keep the superblock active.

So why not have it acquire an active superblock reference at the
same time? We don't need struct mount reference there - all it
takes in increment of inode->i_sb->s_active on try_break_deleg()
side and deactivate_super() on ->i_sb fetched *before* iput()
of ->di_inode on the break_deleg_wait() side...

No need to mess with every user of that thing...