linux/fs/overlayfs
Christian Brauner dad7017a84 ovl: use ovl_path_getxattr() wrapper
Add a helper that allows to retrieve ovl xattrs from either lower or
upper layers. To stop passing mnt and dentry separately everywhere use
struct path which more accurately reflects the tight coupling between
mount and dentry in this helper. Swich over all places to pass a path
argument that can operate on either upper or lower layers. This is
needed to support idmapped base layers with overlayfs.

Some helpers are always called with an upper dentry, which is now utilized
by these helpers to create the path.  Make this usage explicit by renaming
the argument to "upperdentry" and by renaming the function as well in some
cases.  Also add a check in ovl_do_getxattr() to catch misuse of these
functions.

Cc: <linux-unionfs@vger.kernel.org>
Tested-by: Giuseppe Scrivano <gscrivan@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2022-04-28 16:31:11 +02:00
..
copy_up.c ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00
dir.c ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00
export.c ovl: fix uninitialized pointer read in ovl_lookup_real_one() 2021-08-10 10:21:30 +02:00
file.c ovl: pass layer mnt to ovl_open_realfile() 2022-04-28 16:31:11 +02:00
inode.c ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00
overlayfs.h ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00
ovl_entry.h ovl: add ovl_upper_mnt_userns() wrapper 2022-04-28 16:31:11 +02:00
readdir.c ovl: use ovl_lookup_upper() wrapper 2022-04-28 16:31:11 +02:00
super.c ovl: use ovl_lookup_upper() wrapper 2022-04-28 16:31:11 +02:00
util.c ovl: use ovl_path_getxattr() wrapper 2022-04-28 16:31:11 +02:00