linux-stable/fs/kernfs
Jeff Layton 0d72b92883 fs: pass the request_mask to generic_fillattr
generic_fillattr just fills in the entire stat struct indiscriminately
today, copying data from the inode. There is at least one attribute
(STATX_CHANGE_COOKIE) that can have side effects when it is reported,
and we're looking at adding more with the addition of multigrain
timestamps.

Add a request_mask argument to generic_fillattr and have most callers
just pass in the value that is passed to getattr. Have other callers
(e.g. ksmbd) just pass in STATX_BASIC_STATS. Also move the setting of
STATX_CHANGE_COOKIE into generic_fillattr.

Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: "Paulo Alcantara (SUSE)" <pc@manguebit.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Message-Id: <20230807-mgctime-v7-2-d1dec143a704@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-09 08:56:36 +02:00
..
dir.c kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR 2023-05-31 19:03:49 +01:00
file.c tty, proc, kernfs, random: Use copy_splice_read() 2023-05-24 08:42:16 -06:00
inode.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kernfs-internal.h kernfs: Use a per-fs rwsem to protect per-fs list of kernfs_super_info. 2023-03-29 12:23:45 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mount.c kernfs: Use a per-fs rwsem to protect per-fs list of kernfs_super_info. 2023-03-29 12:23:45 +02:00
symlink.c kernfs: fix all kernel-doc warnings and multiple typos 2022-11-23 19:28:26 +01:00