Re: [PATCH 1/2] VFS: change old_dir and new_dir in struct renamedata to dentrys

From: Al Viro
Date: Wed Jun 11 2025 - 19:39:01 EST


On Thu, Jun 12, 2025 at 08:57:02AM +1000, NeilBrown wrote:
> all users of 'struct renamedata' have the dentry for the old and new
> directories, and often have no use for the inode except to store it in
> the renamedata.
>
> This patch changes struct renamedata to hold the dentry, rather than
> the inode, for the old and new directories, and changes callers to
> match.
>
> This results in the removal of several local variables and several
> dereferences of ->d_inode at the cost of adding ->d_inode dereferences
> to vfs_rename().

Umm... No objections, as long as overlayfs part is correct; it seems
to be, but I hadn't checked every chunk there...