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>
Showing
- fs/9p/vfs_inode.c 2 additions, 2 deletionsfs/9p/vfs_inode.c
- fs/9p/vfs_inode_dotl.c 2 additions, 2 deletionsfs/9p/vfs_inode_dotl.c
- fs/afs/inode.c 1 addition, 1 deletionfs/afs/inode.c
- fs/btrfs/inode.c 1 addition, 1 deletionfs/btrfs/inode.c
- fs/ceph/inode.c 1 addition, 1 deletionfs/ceph/inode.c
- fs/coda/inode.c 2 additions, 1 deletionfs/coda/inode.c
- fs/ecryptfs/inode.c 3 additions, 2 deletionsfs/ecryptfs/inode.c
- fs/erofs/inode.c 1 addition, 1 deletionfs/erofs/inode.c
- fs/exfat/file.c 1 addition, 1 deletionfs/exfat/file.c
- fs/ext2/inode.c 1 addition, 1 deletionfs/ext2/inode.c
- fs/ext4/inode.c 1 addition, 1 deletionfs/ext4/inode.c
- fs/f2fs/file.c 1 addition, 1 deletionfs/f2fs/file.c
- fs/fat/file.c 1 addition, 1 deletionfs/fat/file.c
- fs/fuse/dir.c 1 addition, 1 deletionfs/fuse/dir.c
- fs/gfs2/inode.c 1 addition, 1 deletionfs/gfs2/inode.c
- fs/hfsplus/inode.c 1 addition, 1 deletionfs/hfsplus/inode.c
- fs/kernfs/inode.c 1 addition, 1 deletionfs/kernfs/inode.c
- fs/libfs.c 2 additions, 2 deletionsfs/libfs.c
- fs/minix/inode.c 1 addition, 1 deletionfs/minix/inode.c
- fs/nfs/inode.c 1 addition, 1 deletionfs/nfs/inode.c
Please register or sign in to comment