diff options
| author | Jeff Layton <[email protected]> | 2023-08-07 19:38:33 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2023-08-09 06:56:36 +0000 |
| commit | 0d72b92883c651a11059d93335f33d65c6eb653b (patch) | |
| tree | b949538682a6267456639f50786e83ce312d78d0 /fs/btrfs/inode.c | |
| parent | fs: remove silly warning from current_time (diff) | |
| download | kernel-0d72b92883c651a11059d93335f33d65c6eb653b.tar.gz kernel-0d72b92883c651a11059d93335f33d65c6eb653b.zip | |
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 <[email protected]>
Reviewed-by: Xiubo Li <[email protected]>
Reviewed-by: "Paulo Alcantara (SUSE)" <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ceac62c1cbfc..29a20f828dda 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8746,7 +8746,7 @@ static int btrfs_getattr(struct mnt_idmap *idmap, STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP); - generic_fillattr(idmap, inode, stat); + generic_fillattr(idmap, request_mask, inode, stat); stat->dev = BTRFS_I(inode)->root->anon_dev; spin_lock(&BTRFS_I(inode)->lock); |
