]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: remove the inode argument to ->d_real() method
authorAmir Goldstein <amir73il@gmail.com>
Fri, 2 Feb 2024 11:01:32 +0000 (13:01 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 6 Feb 2024 16:00:12 +0000 (17:00 +0100)
commit11b3f8ae7081607a783d60e8098d46b787f79cad
treee981c874aaf08f48548bb27492929618d3076ead
parent3058fca1ed7955c904584a6d86108d664a927177
fs: remove the inode argument to ->d_real() method

The only remaining user of ->d_real() method is d_real_inode(), which
passed NULL inode argument to get the real data dentry.

There are no longer any users that call ->d_real() with a non-NULL
inode argument for getting a detry from a specific underlying layer.

Remove the inode argument of the method and replace it with an integer
'type' argument, to allow callers to request the real metadata dentry
instead of the real data dentry.

All the current users of d_real_inode() (e.g. uprobe) continue to get
the real data inode.  Caller that need to get the real metadata inode
(e.g. IMA/EVM) can use d_inode(d_real(dentry, D_REAL_METADATA)).

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20240202110132.1584111-3-amir73il@gmail.com
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Documentation/filesystems/locking.rst
Documentation/filesystems/vfs.rst
fs/overlayfs/super.c
include/linux/dcache.h