On Sun, Jun 11, 2023 at 04:27:31PM +0300, Amir Goldstein wrote: > Overlayfs knows the real path of underlying dentries. Add an optional > struct vfsmount out argument to ->d_real(), so callers could compose the > real path. > > Add a helper f_real_path() that uses this new interface to return the > real path of f_inode, for overlayfs internal files whose f_path if a > "fake" overlayfs path and f_inode is the underlying real inode. I really don't like this ->d_real nagic. Most callers of it really can't ever be on overlayfs. So I'd suggest we do an audit of the callers of file_dentry and drop all the pointless ones first, and improve the documentation on when to use it.