History

tree-wide: s/struct fileattr/struct file_kattr/g

Now that we expose struct file_attr as our uapi struct rename all the internal struct to struct file_kattr to clearly communicate that it is a kernel internal struct. This is similar to struct mount_{k}attr and others.

Christian Brauner committed 1 year ago

Commit ca115d71 parent 662416543 files · +122 −122Browse files

Unified · Split

43 files
  1. Documentation/filesystems/locking.rst +2 −2
  2. Documentation/filesystems/vfs.rst +2 −2
  3. fs/bcachefs/fs.c +2 −2
  4. fs/btrfs/ioctl.c +2 −2
  5. fs/btrfs/ioctl.h +3 −3
  6. fs/ecryptfs/inode.c +2 −2
  7. fs/efivarfs/inode.c +2 −2
  8. fs/ext2/ext2.h +2 −2
  9. fs/ext2/ioctl.c +2 −2
  10. fs/ext4/ext4.h +2 −2
  11. fs/ext4/ioctl.c +2 −2
  12. fs/f2fs/f2fs.h +2 −2
  13. fs/f2fs/file.c +2 −2
  14. fs/file_attr.c +17 −17
  15. fs/fuse/fuse_i.h +2 −2
  16. fs/fuse/ioctl.c +2 −2
  17. fs/gfs2/file.c +2 −2
  18. fs/gfs2/inode.h +2 −2
  19. fs/hfsplus/hfsplus_fs.h +2 −2
  20. fs/hfsplus/inode.c +2 −2
  21. fs/jfs/ioctl.c +2 −2
  22. fs/jfs/jfs_inode.h +2 −2
  23. fs/nilfs2/ioctl.c +2 −2
  24. fs/nilfs2/nilfs.h +2 −2
  25. fs/ocfs2/ioctl.c +2 −2
  26. fs/ocfs2/ioctl.h +2 −2
  27. fs/orangefs/inode.c +2 −2
  28. fs/overlayfs/copy_up.c +2 −2
  29. fs/overlayfs/inode.c +6 −6
  30. fs/overlayfs/overlayfs.h +5 −5
  31. fs/overlayfs/util.c +1 −1
  32. fs/ubifs/ioctl.c +2 −2
  33. fs/ubifs/ubifs.h +2 −2
  34. fs/xfs/xfs_ioctl.c +9 −9
  35. fs/xfs/xfs_ioctl.h +2 −2
  36. include/linux/fileattr.h +7 −7
  37. include/linux/fs.h +3 −3
  38. include/linux/lsm_hook_defs.h +2 −2
  39. include/linux/security.h +4 −4
  40. include/uapi/linux/fs.h +1 −1
  41. mm/shmem.c +2 −2
  42. security/security.c +2 −2
  43. security/selinux/hooks.c +2 −2
Documentation/filesystems/locking.rst+2−2
@@ -87,8 +87,8 @@ prototypes:: · 86 unmodified lines
8787 int (*tmpfile) (struct mnt_idmap *, struct inode *,
8888 struct file *, umode_t);
8989 int (*fileattr_set)(struct mnt_idmap *idmap,
90− struct dentry *dentry, struct fileattr *fa);
91− int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa);
90+ struct dentry *dentry, struct file_kattr *fa);
91+ int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
9292 struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
9393 struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
9494
Documentation/filesystems/vfs.rst+2−2
@@ -515,8 +515,8 @@ As of kernel 2.6.22, the following members are defined: · 514 unmodified lines
515515 struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
516516 int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int);
517517 int (*fileattr_set)(struct mnt_idmap *idmap,
518− struct dentry *dentry, struct fileattr *fa);
519− int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa);
518+ struct dentry *dentry, struct file_kattr *fa);
519+ int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
520520 struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
521521 };
522522
fs/bcachefs/fs.c+2−2
@@ -1619,7 +1619,7 @@ static const __maybe_unused unsigned bch_flags_to_xflags[] = { · 1618 unmodified lines
16191619 };
16201620
16211621 static int bch2_fileattr_get(struct dentry *dentry,
1622− struct fileattr *fa)
1622+ struct file_kattr *fa)
16231623 {
16241624 struct bch_inode_info *inode = to_bch_ei(d_inode(dentry));
16251625 struct bch_fs *c = inode->v.i_sb->s_fs_info;
@@ -1682,7 +1682,7 @@ static int fssetxattr_inode_update_fn(struct btree_trans *trans, · 56 unmodified lines
16821682
16831683 static int bch2_fileattr_set(struct mnt_idmap *idmap,
16841684 struct dentry *dentry,
1685− struct fileattr *fa)
1685+ struct file_kattr *fa)
16861686 {
16871687 struct bch_inode_info *inode = to_bch_ei(d_inode(dentry));
16881688 struct bch_fs *c = inode->v.i_sb->s_fs_info;
fs/btrfs/ioctl.c+2−2
@@ -245,7 +245,7 @@ static int btrfs_check_ioctl_vol_args2_subvol_name(const struct btrfs_ioctl_vol_ · 244 unmodified lines
245245 * Set flags/xflags from the internal inode flags. The remaining items of
246246 * fsxattr are zeroed.
247247 */
248−int btrfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
248+int btrfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
249249 {
250250 const struct btrfs_inode *inode = BTRFS_I(d_inode(dentry));
251251
@@ -254,7 +254,7 @@ int btrfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 2 unmodified lines
254254 }
255255
256256 int btrfs_fileattr_set(struct mnt_idmap *idmap,
257− struct dentry *dentry, struct fileattr *fa)
257+ struct dentry *dentry, struct file_kattr *fa)
258258 {
259259 struct btrfs_inode *inode = BTRFS_I(d_inode(dentry));
260260 struct btrfs_root *root = inode->root;
fs/btrfs/ioctl.h+3−3
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 struct file;
99 struct dentry;
1010 struct mnt_idmap;
11−struct fileattr;
11+struct file_kattr;
1212 struct io_uring_cmd;
1313 struct btrfs_inode;
1414 struct btrfs_fs_info;
@@ -16,9 +16,9 @@ struct btrfs_ioctl_balance_args; · 1 unmodified line
1616
1717 long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
1818 long btrfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
19−int btrfs_fileattr_get(struct dentry *dentry, struct fileattr *fa);
19+int btrfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
2020 int btrfs_fileattr_set(struct mnt_idmap *idmap,
21− struct dentry *dentry, struct fileattr *fa);
21+ struct dentry *dentry, struct file_kattr *fa);
2222 int btrfs_ioctl_get_supported_features(void __user *arg);
2323 void btrfs_sync_inode_flags_to_i_flags(struct btrfs_inode *inode);
2424 void btrfs_update_ioctl_balance_args(struct btrfs_fs_info *fs_info,
fs/ecryptfs/inode.c+2−2
@@ -1124,13 +1124,13 @@ out: · 1123 unmodified lines
11241124 return rc;
11251125 }
11261126
1127−static int ecryptfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
1127+static int ecryptfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
11281128 {
11291129 return vfs_fileattr_get(ecryptfs_dentry_to_lower(dentry), fa);
11301130 }
11311131
11321132 static int ecryptfs_fileattr_set(struct mnt_idmap *idmap,
1133− struct dentry *dentry, struct fileattr *fa)
1133+ struct dentry *dentry, struct file_kattr *fa)
11341134 {
11351135 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
11361136 int rc;
fs/efivarfs/inode.c+2−2
@@ -138,7 +138,7 @@ const struct inode_operations efivarfs_dir_inode_operations = { · 137 unmodified lines
138138 };
139139
140140 static int
141−efivarfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
141+efivarfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
142142 {
143143 unsigned int i_flags;
144144 unsigned int flags = 0;
@@ -154,7 +154,7 @@ efivarfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 9 unmodified lines
154154
155155 static int
156156 efivarfs_fileattr_set(struct mnt_idmap *idmap,
157− struct dentry *dentry, struct fileattr *fa)
157+ struct dentry *dentry, struct file_kattr *fa)
158158 {
159159 unsigned int i_flags = 0;
160160
fs/ext2/ext2.h+2−2
@@ -750,9 +750,9 @@ extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 749 unmodified lines
750750 u64 start, u64 len);
751751
752752 /* ioctl.c */
753−extern int ext2_fileattr_get(struct dentry *dentry, struct fileattr *fa);
753+extern int ext2_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
754754 extern int ext2_fileattr_set(struct mnt_idmap *idmap,
755− struct dentry *dentry, struct fileattr *fa);
755+ struct dentry *dentry, struct file_kattr *fa);
756756 extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
757757 extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long);
758758
fs/ext2/ioctl.c+2−2
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 #include <linux/uaccess.h>
1919 #include <linux/fileattr.h>
2020
21−int ext2_fileattr_get(struct dentry *dentry, struct fileattr *fa)
21+int ext2_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
2222 {
2323 struct ext2_inode_info *ei = EXT2_I(d_inode(dentry));
2424
@@ -28,7 +28,7 @@ int ext2_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 3 unmodified lines
2828 }
2929
3030 int ext2_fileattr_set(struct mnt_idmap *idmap,
31− struct dentry *dentry, struct fileattr *fa)
31+ struct dentry *dentry, struct file_kattr *fa)
3232 {
3333 struct inode *inode = d_inode(dentry);
3434 struct ext2_inode_info *ei = EXT2_I(inode);
fs/ext4/ext4.h+2−2
@@ -3103,8 +3103,8 @@ extern int ext4_ind_remove_space(handle_t *handle, struct inode *inode, · 3102 unmodified lines
31033103 extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
31043104 extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
31053105 int ext4_fileattr_set(struct mnt_idmap *idmap,
3106− struct dentry *dentry, struct fileattr *fa);
3107−int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa);
3106+ struct dentry *dentry, struct file_kattr *fa);
3107+int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
31083108 extern void ext4_reset_inode_seed(struct inode *inode);
31093109 int ext4_update_overhead(struct super_block *sb, bool force);
31103110 int ext4_force_shutdown(struct super_block *sb, u32 flags);
fs/ext4/ioctl.c+2−2
@@ -980,7 +980,7 @@ group_add_out: · 979 unmodified lines
980980 return err;
981981 }
982982
983−int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa)
983+int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
984984 {
985985 struct inode *inode = d_inode(dentry);
986986 struct ext4_inode_info *ei = EXT4_I(inode);
@@ -997,7 +997,7 @@ int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 10 unmodified lines
997997 }
998998
999999 int ext4_fileattr_set(struct mnt_idmap *idmap,
1000− struct dentry *dentry, struct fileattr *fa)
1000+ struct dentry *dentry, struct file_kattr *fa)
10011001 {
10021002 struct inode *inode = d_inode(dentry);
10031003 u32 flags = fa->flags;
fs/f2fs/f2fs.h+2−2
@@ -3615,9 +3615,9 @@ void f2fs_truncate_data_blocks_range(struct dnode_of_data *dn, int count); · 3614 unmodified lines
36153615 int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag,
36163616 bool readonly, bool need_lock);
36173617 int f2fs_precache_extents(struct inode *inode);
3618−int f2fs_fileattr_get(struct dentry *dentry, struct fileattr *fa);
3618+int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
36193619 int f2fs_fileattr_set(struct mnt_idmap *idmap,
3620− struct dentry *dentry, struct fileattr *fa);
3620+ struct dentry *dentry, struct file_kattr *fa);
36213621 long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
36223622 long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
36233623 int f2fs_transfer_project_quota(struct inode *inode, kprojid_t kprojid);
fs/f2fs/file.c+2−2
@@ -3356,7 +3356,7 @@ static int f2fs_ioc_setproject(struct inode *inode, __u32 projid) · 3355 unmodified lines
33563356 }
33573357 #endif
33583358
3359−int f2fs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
3359+int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
33603360 {
33613361 struct inode *inode = d_inode(dentry);
33623362 struct f2fs_inode_info *fi = F2FS_I(inode);
@@ -3380,7 +3380,7 @@ int f2fs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 17 unmodified lines
33803380 }
33813381
33823382 int f2fs_fileattr_set(struct mnt_idmap *idmap,
3383− struct dentry *dentry, struct fileattr *fa)
3383+ struct dentry *dentry, struct file_kattr *fa)
33843384 {
33853385 struct inode *inode = d_inode(dentry);
33863386 u32 fsflags = fa->flags, mask = F2FS_SETTABLE_FS_FL;
fs/file_attr.c+17−17
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 * Set ->fsx_xflags, ->fsx_valid and ->flags (translated xflags). All
1818 * other fields are zeroed.
1919 */
20−void fileattr_fill_xflags(struct fileattr *fa, u32 xflags)
20+void fileattr_fill_xflags(struct file_kattr *fa, u32 xflags)
2121 {
2222 memset(fa, 0, sizeof(*fa));
2323 fa->fsx_valid = true;
@@ -47,7 +47,7 @@ EXPORT_SYMBOL(fileattr_fill_xflags); · 23 unmodified lines
4747 * Set ->flags, ->flags_valid and ->fsx_xflags (translated flags).
4848 * All other fields are zeroed.
4949 */
50−void fileattr_fill_flags(struct fileattr *fa, u32 flags)
50+void fileattr_fill_flags(struct file_kattr *fa, u32 flags)
5151 {
5252 memset(fa, 0, sizeof(*fa));
5353 fa->flags_valid = true;
@@ -78,7 +78,7 @@ EXPORT_SYMBOL(fileattr_fill_flags); · 24 unmodified lines
7878 *
7979 * Return: 0 on success, or a negative error on failure.
8080 */
81−int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
81+int vfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
8282 {
8383 struct inode *inode = d_inode(dentry);
8484 int error;
@@ -94,7 +94,7 @@ int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 9 unmodified lines
9494 }
9595 EXPORT_SYMBOL(vfs_fileattr_get);
9696
97−static void fileattr_to_file_attr(const struct fileattr *fa,
97+static void fileattr_to_file_attr(const struct file_kattr *fa,
9898 struct file_attr *fattr)
9999 {
100100 __u32 mask = FS_XFLAGS_MASK;
@@ -114,7 +114,7 @@ static void fileattr_to_file_attr(const struct fileattr *fa, · 13 unmodified lines
114114 *
115115 * Return: 0 on success, or -EFAULT on failure.
116116 */
117−int copy_fsxattr_to_user(const struct fileattr *fa, struct fsxattr __user *ufa)
117+int copy_fsxattr_to_user(const struct file_kattr *fa, struct fsxattr __user *ufa)
118118 {
119119 struct fsxattr xfa;
120120 __u32 mask = FS_XFLAGS_MASK;
@@ -134,7 +134,7 @@ int copy_fsxattr_to_user(const struct fileattr *fa, struct fsxattr __user *ufa) · 13 unmodified lines
134134 EXPORT_SYMBOL(copy_fsxattr_to_user);
135135
136136 static int file_attr_to_fileattr(const struct file_attr *fattr,
137− struct fileattr *fa)
137+ struct file_kattr *fa)
138138 {
139139 __u32 mask = FS_XFLAGS_MASK;
140140
@@ -150,7 +150,7 @@ static int file_attr_to_fileattr(const struct file_attr *fattr, · 9 unmodified lines
150150 return 0;
151151 }
152152
153−static int copy_fsxattr_from_user(struct fileattr *fa,
153+static int copy_fsxattr_from_user(struct file_kattr *fa,
154154 struct fsxattr __user *ufa)
155155 {
156156 struct fsxattr xfa;
@@ -179,8 +179,8 @@ static int copy_fsxattr_from_user(struct fileattr *fa, · 22 unmodified lines
179179 * Note: must be called with inode lock held.
180180 */
181181 static int fileattr_set_prepare(struct inode *inode,
182− const struct fileattr *old_ma,
183− struct fileattr *fa)
182+ const struct file_kattr *old_ma,
183+ struct file_kattr *fa)
184184 {
185185 int err;
186186
@@ -263,10 +263,10 @@ static int fileattr_set_prepare(struct inode *inode, · 76 unmodified lines
263263 * Return: 0 on success, or a negative error on failure.
264264 */
265265 int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,
266− struct fileattr *fa)
266+ struct file_kattr *fa)
267267 {
268268 struct inode *inode = d_inode(dentry);
269− struct fileattr old_ma = {};
269+ struct file_kattr old_ma = {};
270270 int err;
271271
272272 if (!inode->i_op->fileattr_set)
@@ -308,7 +308,7 @@ EXPORT_SYMBOL(vfs_fileattr_set); · 35 unmodified lines
308308
309309 int ioctl_getflags(struct file *file, unsigned int __user *argp)
310310 {
311− struct fileattr fa = { .flags_valid = true }; /* hint only */
311+ struct file_kattr fa = { .flags_valid = true }; /* hint only */
312312 int err;
313313
314314 err = vfs_fileattr_get(file->f_path.dentry, &fa);
@@ -324,7 +324,7 @@ int ioctl_setflags(struct file *file, unsigned int __user *argp) · 9 unmodified lines
324324 {
325325 struct mnt_idmap *idmap = file_mnt_idmap(file);
326326 struct dentry *dentry = file->f_path.dentry;
327− struct fileattr fa;
327+ struct file_kattr fa;
328328 unsigned int flags;
329329 int err;
330330
@@ -345,7 +345,7 @@ EXPORT_SYMBOL(ioctl_setflags); · 14 unmodified lines
345345
346346 int ioctl_fsgetxattr(struct file *file, void __user *argp)
347347 {
348− struct fileattr fa = { .fsx_valid = true }; /* hint only */
348+ struct file_kattr fa = { .fsx_valid = true }; /* hint only */
349349 int err;
350350
351351 err = vfs_fileattr_get(file->f_path.dentry, &fa);
@@ -362,7 +362,7 @@ int ioctl_fssetxattr(struct file *file, void __user *argp) · 10 unmodified lines
362362 {
363363 struct mnt_idmap *idmap = file_mnt_idmap(file);
364364 struct dentry *dentry = file->f_path.dentry;
365− struct fileattr fa;
365+ struct file_kattr fa;
366366 int err;
367367
368368 err = copy_fsxattr_from_user(&fa, argp);
@@ -387,7 +387,7 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename, · 18 unmodified lines
387387 struct filename *name __free(putname) = NULL;
388388 unsigned int lookup_flags = 0;
389389 struct file_attr fattr;
390− struct fileattr fa;
390+ struct file_kattr fa;
391391 int error;
392392
393393 BUILD_BUG_ON(sizeof(struct file_attr) < FILE_ATTR_SIZE_VER0);
@@ -442,7 +442,7 @@ SYSCALL_DEFINE5(file_setattr, int, dfd, const char __user *, filename, · 48 unmodified lines
442442 struct filename *name __free(putname) = NULL;
443443 unsigned int lookup_flags = 0;
444444 struct file_attr fattr;
445− struct fileattr fa;
445+ struct file_kattr fa;
446446 int error;
447447
448448 BUILD_BUG_ON(sizeof(struct file_attr) < FILE_ATTR_SIZE_VER0);
fs/fuse/fuse_i.h+2−2
@@ -1486,9 +1486,9 @@ void fuse_dax_cancel_work(struct fuse_conn *fc); · 1485 unmodified lines
14861486 long fuse_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
14871487 long fuse_file_compat_ioctl(struct file *file, unsigned int cmd,
14881488 unsigned long arg);
1489−int fuse_fileattr_get(struct dentry *dentry, struct fileattr *fa);
1489+int fuse_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
14901490 int fuse_fileattr_set(struct mnt_idmap *idmap,
1491− struct dentry *dentry, struct fileattr *fa);
1491+ struct dentry *dentry, struct file_kattr *fa);
14921492
14931493 /* iomode.c */
14941494 int fuse_file_cached_io_open(struct inode *inode, struct fuse_file *ff);
fs/fuse/ioctl.c+2−2
@@ -502,7 +502,7 @@ static void fuse_priv_ioctl_cleanup(struct inode *inode, struct fuse_file *ff) · 501 unmodified lines
502502 fuse_file_release(inode, ff, O_RDONLY, NULL, S_ISDIR(inode->i_mode));
503503 }
504504
505−int fuse_fileattr_get(struct dentry *dentry, struct fileattr *fa)
505+int fuse_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
506506 {
507507 struct inode *inode = d_inode(dentry);
508508 struct fuse_file *ff;
@@ -542,7 +542,7 @@ cleanup: · 33 unmodified lines
542542 }
543543
544544 int fuse_fileattr_set(struct mnt_idmap *idmap,
545− struct dentry *dentry, struct fileattr *fa)
545+ struct dentry *dentry, struct file_kattr *fa)
546546 {
547547 struct inode *inode = d_inode(dentry);
548548 struct fuse_file *ff;
fs/gfs2/file.c+2−2
@@ -155,7 +155,7 @@ static inline u32 gfs2_gfsflags_to_fsflags(struct inode *inode, u32 gfsflags) · 154 unmodified lines
155155 return fsflags;
156156 }
157157
158−int gfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa)
158+int gfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
159159 {
160160 struct inode *inode = d_inode(dentry);
161161 struct gfs2_inode *ip = GFS2_I(inode);
@@ -276,7 +276,7 @@ out: · 114 unmodified lines
276276 }
277277
278278 int gfs2_fileattr_set(struct mnt_idmap *idmap,
279− struct dentry *dentry, struct fileattr *fa)
279+ struct dentry *dentry, struct file_kattr *fa)
280280 {
281281 struct inode *inode = d_inode(dentry);
282282 u32 fsflags = fa->flags, gfsflags = 0;
fs/gfs2/inode.h+2−2
@@ -107,9 +107,9 @@ loff_t gfs2_seek_hole(struct file *file, loff_t offset); · 106 unmodified lines
107107 extern const struct file_operations gfs2_file_fops_nolock;
108108 extern const struct file_operations gfs2_dir_fops_nolock;
109109
110−int gfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa);
110+int gfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
111111 int gfs2_fileattr_set(struct mnt_idmap *idmap,
112− struct dentry *dentry, struct fileattr *fa);
112+ struct dentry *dentry, struct file_kattr *fa);
113113 void gfs2_set_inode_flags(struct inode *inode);
114114
115115 #ifdef CONFIG_GFS2_FS_LOCKING_DLM
fs/hfsplus/hfsplus_fs.h+2−2
@@ -489,9 +489,9 @@ int hfsplus_getattr(struct mnt_idmap *idmap, const struct path *path, · 488 unmodified lines
489489 unsigned int query_flags);
490490 int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
491491 int datasync);
492−int hfsplus_fileattr_get(struct dentry *dentry, struct fileattr *fa);
492+int hfsplus_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
493493 int hfsplus_fileattr_set(struct mnt_idmap *idmap,
494− struct dentry *dentry, struct fileattr *fa);
494+ struct dentry *dentry, struct file_kattr *fa);
495495
496496 /* ioctl.c */
497497 long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
fs/hfsplus/inode.c+2−2
@@ -654,7 +654,7 @@ out: · 653 unmodified lines
654654 return res;
655655 }
656656
657−int hfsplus_fileattr_get(struct dentry *dentry, struct fileattr *fa)
657+int hfsplus_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
658658 {
659659 struct inode *inode = d_inode(dentry);
660660 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
@@ -673,7 +673,7 @@ int hfsplus_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 12 unmodified lines
673673 }
674674
675675 int hfsplus_fileattr_set(struct mnt_idmap *idmap,
676− struct dentry *dentry, struct fileattr *fa)
676+ struct dentry *dentry, struct file_kattr *fa)
677677 {
678678 struct inode *inode = d_inode(dentry);
679679 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
fs/jfs/ioctl.c+2−2
@@ -57,7 +57,7 @@ static long jfs_map_ext2(unsigned long flags, int from) · 56 unmodified lines
5757 return mapped;
5858 }
5959
60−int jfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
60+int jfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
6161 {
6262 struct jfs_inode_info *jfs_inode = JFS_IP(d_inode(dentry));
6363 unsigned int flags = jfs_inode->mode2 & JFS_FL_USER_VISIBLE;
@@ -71,7 +71,7 @@ int jfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 7 unmodified lines
7171 }
7272
7373 int jfs_fileattr_set(struct mnt_idmap *idmap,
74− struct dentry *dentry, struct fileattr *fa)
74+ struct dentry *dentry, struct file_kattr *fa)
7575 {
7676 struct inode *inode = d_inode(dentry);
7777 struct jfs_inode_info *jfs_inode = JFS_IP(inode);
fs/jfs/jfs_inode.h+2−2
@@ -9,9 +9,9 @@ struct fid; · 8 unmodified lines
99
1010 extern struct inode *ialloc(struct inode *, umode_t);
1111 extern int jfs_fsync(struct file *, loff_t, loff_t, int);
12−extern int jfs_fileattr_get(struct dentry *dentry, struct fileattr *fa);
12+extern int jfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
1313 extern int jfs_fileattr_set(struct mnt_idmap *idmap,
14− struct dentry *dentry, struct fileattr *fa);
14+ struct dentry *dentry, struct file_kattr *fa);
1515 extern long jfs_ioctl(struct file *, unsigned int, unsigned long);
1616 extern struct inode *jfs_iget(struct super_block *, unsigned long);
1717 extern int jfs_commit_inode(struct inode *, int);
fs/nilfs2/ioctl.c+2−2
@@ -118,7 +118,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, · 117 unmodified lines
118118 *
119119 * Return: always 0 as success.
120120 */
121−int nilfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
121+int nilfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
122122 {
123123 struct inode *inode = d_inode(dentry);
124124
@@ -136,7 +136,7 @@ int nilfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 11 unmodified lines
136136 * Return: 0 on success, or a negative error code on failure.
137137 */
138138 int nilfs_fileattr_set(struct mnt_idmap *idmap,
139− struct dentry *dentry, struct fileattr *fa)
139+ struct dentry *dentry, struct file_kattr *fa)
140140 {
141141 struct inode *inode = d_inode(dentry);
142142 struct nilfs_transaction_info ti;
fs/nilfs2/nilfs.h+2−2
@@ -268,9 +268,9 @@ int nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, · 267 unmodified lines
268268 extern int nilfs_sync_file(struct file *, loff_t, loff_t, int);
269269
270270 /* ioctl.c */
271−int nilfs_fileattr_get(struct dentry *dentry, struct fileattr *m);
271+int nilfs_fileattr_get(struct dentry *dentry, struct file_kattr *m);
272272 int nilfs_fileattr_set(struct mnt_idmap *idmap,
273− struct dentry *dentry, struct fileattr *fa);
273+ struct dentry *dentry, struct file_kattr *fa);
274274 long nilfs_ioctl(struct file *, unsigned int, unsigned long);
275275 long nilfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
276276 int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *, struct nilfs_argv *,
fs/ocfs2/ioctl.c+2−2
@@ -62,7 +62,7 @@ static inline int o2info_coherent(struct ocfs2_info_request *req) · 61 unmodified lines
6262 return (!(req->ir_flags & OCFS2_INFO_FL_NON_COHERENT));
6363 }
6464
65−int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa)
65+int ocfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
6666 {
6767 struct inode *inode = d_inode(dentry);
6868 unsigned int flags;
@@ -83,7 +83,7 @@ int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 14 unmodified lines
8383 }
8484
8585 int ocfs2_fileattr_set(struct mnt_idmap *idmap,
86− struct dentry *dentry, struct fileattr *fa)
86+ struct dentry *dentry, struct file_kattr *fa)
8787 {
8888 struct inode *inode = d_inode(dentry);
8989 unsigned int flags = fa->flags;
fs/ocfs2/ioctl.h+2−2
@@ -11,9 +11,9 @@ · 10 unmodified lines
1111 #ifndef OCFS2_IOCTL_PROTO_H
1212 #define OCFS2_IOCTL_PROTO_H
1313
14−int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa);
14+int ocfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
1515 int ocfs2_fileattr_set(struct mnt_idmap *idmap,
16− struct dentry *dentry, struct fileattr *fa);
16+ struct dentry *dentry, struct file_kattr *fa);
1717 long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
1818 long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg);
1919
fs/orangefs/inode.c+2−2
@@ -887,7 +887,7 @@ int orangefs_update_time(struct inode *inode, int flags) · 886 unmodified lines
887887 return __orangefs_setattr(inode, &iattr);
888888 }
889889
890−static int orangefs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
890+static int orangefs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
891891 {
892892 u64 val = 0;
893893 int ret;
@@ -908,7 +908,7 @@ static int orangefs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 14 unmodified lines
908908 }
909909
910910 static int orangefs_fileattr_set(struct mnt_idmap *idmap,
911− struct dentry *dentry, struct fileattr *fa)
911+ struct dentry *dentry, struct file_kattr *fa)
912912 {
913913 u64 val = 0;
914914
fs/overlayfs/copy_up.c+2−2
@@ -171,8 +171,8 @@ out: · 170 unmodified lines
171171 static int ovl_copy_fileattr(struct inode *inode, const struct path *old,
172172 const struct path *new)
173173 {
174− struct fileattr oldfa = { .flags_valid = true };
175− struct fileattr newfa = { .flags_valid = true };
174+ struct file_kattr oldfa = { .flags_valid = true };
175+ struct file_kattr newfa = { .flags_valid = true };
176176 int err;
177177
178178 err = ovl_real_fileattr_get(old, &oldfa);
fs/overlayfs/inode.c+6−6
@@ -610,7 +610,7 @@ static int ovl_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 609 unmodified lines
610610 * Introducing security_inode_fileattr_get/set() hooks would solve this issue
611611 * properly.
612612 */
613−static int ovl_security_fileattr(const struct path *realpath, struct fileattr *fa,
613+static int ovl_security_fileattr(const struct path *realpath, struct file_kattr *fa,
614614 bool set)
615615 {
616616 struct file *file;
@@ -637,7 +637,7 @@ static int ovl_security_fileattr(const struct path *realpath, struct fileattr *f · 20 unmodified lines
637637 return err;
638638 }
639639
640−int ovl_real_fileattr_set(const struct path *realpath, struct fileattr *fa)
640+int ovl_real_fileattr_set(const struct path *realpath, struct file_kattr *fa)
641641 {
642642 int err;
643643
@@ -649,7 +649,7 @@ int ovl_real_fileattr_set(const struct path *realpath, struct fileattr *fa) · 5 unmodified lines
649649 }
650650
651651 int ovl_fileattr_set(struct mnt_idmap *idmap,
652− struct dentry *dentry, struct fileattr *fa)
652+ struct dentry *dentry, struct file_kattr *fa)
653653 {
654654 struct inode *inode = d_inode(dentry);
655655 struct path upperpath;
@@ -697,7 +697,7 @@ out: · 41 unmodified lines
697697 }
698698
699699 /* Convert inode protection flags to fileattr flags */
700−static void ovl_fileattr_prot_flags(struct inode *inode, struct fileattr *fa)
700+static void ovl_fileattr_prot_flags(struct inode *inode, struct file_kattr *fa)
701701 {
702702 BUILD_BUG_ON(OVL_PROT_FS_FLAGS_MASK & ~FS_COMMON_FL);
703703 BUILD_BUG_ON(OVL_PROT_FSX_FLAGS_MASK & ~FS_XFLAG_COMMON);
@@ -712,7 +712,7 @@ static void ovl_fileattr_prot_flags(struct inode *inode, struct fileattr *fa) · 8 unmodified lines
712712 }
713713 }
714714
715−int ovl_real_fileattr_get(const struct path *realpath, struct fileattr *fa)
715+int ovl_real_fileattr_get(const struct path *realpath, struct file_kattr *fa)
716716 {
717717 int err;
718718
@@ -723,7 +723,7 @@ int ovl_real_fileattr_get(const struct path *realpath, struct fileattr *fa) · 4 unmodified lines
723723 return vfs_fileattr_get(realpath->dentry, fa);
724724 }
725725
726−int ovl_fileattr_get(struct dentry *dentry, struct fileattr *fa)
726+int ovl_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
727727 {
728728 struct inode *inode = d_inode(dentry);
729729 struct path realpath;
fs/overlayfs/overlayfs.h+5−5
@@ -815,7 +815,7 @@ void ovl_copyattr(struct inode *to); · 814 unmodified lines
815815
816816 void ovl_check_protattr(struct inode *inode, struct dentry *upper);
817817 int ovl_set_protattr(struct inode *inode, struct dentry *upper,
818− struct fileattr *fa);
818+ struct file_kattr *fa);
819819
820820 static inline void ovl_copyflags(struct inode *from, struct inode *to)
821821 {
@@ -847,11 +847,11 @@ struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir, · 25 unmodified lines
847847
848848 /* file.c */
849849 extern const struct file_operations ovl_file_operations;
850−int ovl_real_fileattr_get(const struct path *realpath, struct fileattr *fa);
851−int ovl_real_fileattr_set(const struct path *realpath, struct fileattr *fa);
852−int ovl_fileattr_get(struct dentry *dentry, struct fileattr *fa);
850+int ovl_real_fileattr_get(const struct path *realpath, struct file_kattr *fa);
851+int ovl_real_fileattr_set(const struct path *realpath, struct file_kattr *fa);
852+int ovl_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
853853 int ovl_fileattr_set(struct mnt_idmap *idmap,
854− struct dentry *dentry, struct fileattr *fa);
854+ struct dentry *dentry, struct file_kattr *fa);
855855 struct ovl_file;
856856 struct ovl_file *ovl_file_alloc(struct file *realfile);
857857 void ovl_file_free(struct ovl_file *of);
fs/overlayfs/util.c+1−1
@@ -959,7 +959,7 @@ void ovl_check_protattr(struct inode *inode, struct dentry *upper) · 958 unmodified lines
959959 }
960960
961961 int ovl_set_protattr(struct inode *inode, struct dentry *upper,
962− struct fileattr *fa)
962+ struct file_kattr *fa)
963963 {
964964 struct ovl_fs *ofs = OVL_FS(inode->i_sb);
965965 char buf[OVL_PROTATTR_MAX];
fs/ubifs/ioctl.c+2−2
@@ -130,7 +130,7 @@ static int setflags(struct inode *inode, int flags) · 129 unmodified lines
130130 return err;
131131 }
132132
133−int ubifs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
133+int ubifs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
134134 {
135135 struct inode *inode = d_inode(dentry);
136136 int flags = ubifs2ioctl(ubifs_inode(inode)->flags);
@@ -145,7 +145,7 @@ int ubifs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 8 unmodified lines
145145 }
146146
147147 int ubifs_fileattr_set(struct mnt_idmap *idmap,
148− struct dentry *dentry, struct fileattr *fa)
148+ struct dentry *dentry, struct file_kattr *fa)
149149 {
150150 struct inode *inode = d_inode(dentry);
151151 int flags = fa->flags;
fs/ubifs/ubifs.h+2−2
@@ -2073,9 +2073,9 @@ int ubifs_recover_size(struct ubifs_info *c, bool in_place); · 2072 unmodified lines
20732073 void ubifs_destroy_size_tree(struct ubifs_info *c);
20742074
20752075 /* ioctl.c */
2076−int ubifs_fileattr_get(struct dentry *dentry, struct fileattr *fa);
2076+int ubifs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
20772077 int ubifs_fileattr_set(struct mnt_idmap *idmap,
2078− struct dentry *dentry, struct fileattr *fa);
2078+ struct dentry *dentry, struct file_kattr *fa);
20792079 long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
20802080 void ubifs_set_inode_flags(struct inode *inode);
20812081 #ifdef CONFIG_COMPAT
fs/xfs/xfs_ioctl.c+9−9
@@ -444,7 +444,7 @@ static void · 443 unmodified lines
444444 xfs_fill_fsxattr(
445445 struct xfs_inode *ip,
446446 int whichfork,
447− struct fileattr *fa)
447+ struct file_kattr *fa)
448448 {
449449 struct xfs_mount *mp = ip->i_mount;
450450 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork);
@@ -496,7 +496,7 @@ xfs_ioc_fsgetxattra( · 45 unmodified lines
496496 xfs_inode_t *ip,
497497 void __user *arg)
498498 {
499− struct fileattr fa;
499+ struct file_kattr fa;
500500
501501 xfs_ilock(ip, XFS_ILOCK_SHARED);
502502 xfs_fill_fsxattr(ip, XFS_ATTR_FORK, &fa);
@@ -508,7 +508,7 @@ xfs_ioc_fsgetxattra( · 5 unmodified lines
508508 int
509509 xfs_fileattr_get(
510510 struct dentry *dentry,
511− struct fileattr *fa)
511+ struct file_kattr *fa)
512512 {
513513 struct xfs_inode *ip = XFS_I(d_inode(dentry));
514514
@@ -526,7 +526,7 @@ static int · 11 unmodified lines
526526 xfs_ioctl_setattr_xflags(
527527 struct xfs_trans *tp,
528528 struct xfs_inode *ip,
529− struct fileattr *fa)
529+ struct file_kattr *fa)
530530 {
531531 struct xfs_mount *mp = ip->i_mount;
532532 bool rtflag = (fa->fsx_xflags & FS_XFLAG_REALTIME);
@@ -582,7 +582,7 @@ xfs_ioctl_setattr_xflags( · 49 unmodified lines
582582 static void
583583 xfs_ioctl_setattr_prepare_dax(
584584 struct xfs_inode *ip,
585− struct fileattr *fa)
585+ struct file_kattr *fa)
586586 {
587587 struct xfs_mount *mp = ip->i_mount;
588588 struct inode *inode = VFS_I(ip);
@@ -642,7 +642,7 @@ out_error: · 53 unmodified lines
642642 static int
643643 xfs_ioctl_setattr_check_extsize(
644644 struct xfs_inode *ip,
645− struct fileattr *fa)
645+ struct file_kattr *fa)
646646 {
647647 struct xfs_mount *mp = ip->i_mount;
648648 xfs_failaddr_t failaddr;
@@ -684,7 +684,7 @@ xfs_ioctl_setattr_check_extsize( · 35 unmodified lines
684684 static int
685685 xfs_ioctl_setattr_check_cowextsize(
686686 struct xfs_inode *ip,
687− struct fileattr *fa)
687+ struct file_kattr *fa)
688688 {
689689 struct xfs_mount *mp = ip->i_mount;
690690 xfs_failaddr_t failaddr;
@@ -709,7 +709,7 @@ xfs_ioctl_setattr_check_cowextsize( · 18 unmodified lines
709709 static int
710710 xfs_ioctl_setattr_check_projid(
711711 struct xfs_inode *ip,
712− struct fileattr *fa)
712+ struct file_kattr *fa)
713713 {
714714 if (!fa->fsx_valid)
715715 return 0;
@@ -725,7 +725,7 @@ int · 9 unmodified lines
725725 xfs_fileattr_set(
726726 struct mnt_idmap *idmap,
727727 struct dentry *dentry,
728− struct fileattr *fa)
728+ struct file_kattr *fa)
729729 {
730730 struct xfs_inode *ip = XFS_I(d_inode(dentry));
731731 struct xfs_mount *mp = ip->i_mount;
fs/xfs/xfs_ioctl.h+2−2
@@ -17,13 +17,13 @@ xfs_ioc_swapext( · 16 unmodified lines
1717 extern int
1818 xfs_fileattr_get(
1919 struct dentry *dentry,
20− struct fileattr *fa);
20+ struct file_kattr *fa);
2121
2222 extern int
2323 xfs_fileattr_set(
2424 struct mnt_idmap *idmap,
2525 struct dentry *dentry,
26− struct fileattr *fa);
26+ struct file_kattr *fa);
2727
2828 extern long
2929 xfs_file_ioctl(
include/linux/fileattr.h+7−7
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 * is handled by the VFS helpers, so filesystems are free to implement just one
4141 * or both of these sub-interfaces.
4242 */
43−struct fileattr {
43+struct file_kattr {
4444 u32 flags; /* flags (FS_IOC_GETFLAGS/FS_IOC_SETFLAGS) */
4545 /* struct fsxattr: */
4646 u32 fsx_xflags; /* xflags field value (get/set) */
@@ -53,10 +53,10 @@ struct fileattr { · 6 unmodified lines
5353 bool fsx_valid:1;
5454 };
5555
56−int copy_fsxattr_to_user(const struct fileattr *fa, struct fsxattr __user *ufa);
56+int copy_fsxattr_to_user(const struct file_kattr *fa, struct fsxattr __user *ufa);
5757
58−void fileattr_fill_xflags(struct fileattr *fa, u32 xflags);
59−void fileattr_fill_flags(struct fileattr *fa, u32 flags);
58+void fileattr_fill_xflags(struct file_kattr *fa, u32 xflags);
59+void fileattr_fill_flags(struct file_kattr *fa, u32 flags);
6060
6161 /**
6262 * fileattr_has_fsx - check for extended flags/attributes
@@ -65,16 +65,16 @@ void fileattr_fill_flags(struct fileattr *fa, u32 flags); · 2 unmodified lines
6565 * Return: true if any attributes are present that are not represented in
6666 * ->flags.
6767 */
68−static inline bool fileattr_has_fsx(const struct fileattr *fa)
68+static inline bool fileattr_has_fsx(const struct file_kattr *fa)
6969 {
7070 return fa->fsx_valid &&
7171 ((fa->fsx_xflags & ~FS_XFLAG_COMMON) || fa->fsx_extsize != 0 ||
7272 fa->fsx_projid != 0 || fa->fsx_cowextsize != 0);
7373 }
7474
75−int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa);
75+int vfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
7676 int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,
77− struct fileattr *fa);
77+ struct file_kattr *fa);
7878 int ioctl_getflags(struct file *file, unsigned int __user *argp);
7979 int ioctl_setflags(struct file *file, unsigned int __user *argp);
8080 int ioctl_fsgetxattr(struct file *file, void __user *argp);
include/linux/fs.h+3−3
@@ -80,7 +80,7 @@ struct fsnotify_mark_connector; · 79 unmodified lines
8080 struct fsnotify_sb_info;
8181 struct fs_context;
8282 struct fs_parameter_spec;
83−struct fileattr;
83+struct file_kattr;
8484 struct iomap_ops;
8585
8686 extern void __init inode_init(void);
@@ -2254,8 +2254,8 @@ struct inode_operations { · 2167 unmodified lines
22542254 int (*set_acl)(struct mnt_idmap *, struct dentry *,
22552255 struct posix_acl *, int);
22562256 int (*fileattr_set)(struct mnt_idmap *idmap,
2257− struct dentry *dentry, struct fileattr *fa);
2258− int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa);
2257+ struct dentry *dentry, struct file_kattr *fa);
2258+ int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
22592259 struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
22602260 } ____cacheline_aligned;
22612261
include/linux/lsm_hook_defs.h+2−2
@@ -157,8 +157,8 @@ LSM_HOOK(int, 0, inode_removexattr, struct mnt_idmap *idmap, · 156 unmodified lines
157157 struct dentry *dentry, const char *name)
158158 LSM_HOOK(void, LSM_RET_VOID, inode_post_removexattr, struct dentry *dentry,
159159 const char *name)
160−LSM_HOOK(int, 0, inode_file_setattr, struct dentry *dentry, struct fileattr *fa)
161−LSM_HOOK(int, 0, inode_file_getattr, struct dentry *dentry, struct fileattr *fa)
160+LSM_HOOK(int, 0, inode_file_setattr, struct dentry *dentry, struct file_kattr *fa)
161+LSM_HOOK(int, 0, inode_file_getattr, struct dentry *dentry, struct file_kattr *fa)
162162 LSM_HOOK(int, 0, inode_set_acl, struct mnt_idmap *idmap,
163163 struct dentry *dentry, const char *acl_name, struct posix_acl *kacl)
164164 LSM_HOOK(void, LSM_RET_VOID, inode_post_set_acl, struct dentry *dentry,
include/linux/security.h+4−4
@@ -452,9 +452,9 @@ int security_inode_removexattr(struct mnt_idmap *idmap, · 451 unmodified lines
452452 struct dentry *dentry, const char *name);
453453 void security_inode_post_removexattr(struct dentry *dentry, const char *name);
454454 int security_inode_file_setattr(struct dentry *dentry,
455− struct fileattr *fa);
455+ struct file_kattr *fa);
456456 int security_inode_file_getattr(struct dentry *dentry,
457− struct fileattr *fa);
457+ struct file_kattr *fa);
458458 int security_inode_need_killpriv(struct dentry *dentry);
459459 int security_inode_killpriv(struct mnt_idmap *idmap, struct dentry *dentry);
460460 int security_inode_getsecurity(struct mnt_idmap *idmap,
@@ -1057,13 +1057,13 @@ static inline void security_inode_post_removexattr(struct dentry *dentry, · 596 unmodified lines
10571057 { }
10581058
10591059 static inline int security_inode_file_setattr(struct dentry *dentry,
1060− struct fileattr *fa)
1060+ struct file_kattr *fa)
10611061 {
10621062 return 0;
10631063 }
10641064
10651065 static inline int security_inode_file_getattr(struct dentry *dentry,
1066− struct fileattr *fa)
1066+ struct file_kattr *fa)
10671067 {
10681068 return 0;
10691069 }
include/uapi/linux/fs.h+1−1
@@ -151,7 +151,7 @@ struct fsxattr { · 150 unmodified lines
151151 /*
152152 * Variable size structure for file_[sg]et_attr().
153153 *
154− * Note. This is alternative to the structure 'struct fileattr'/'struct fsxattr'.
154+ * Note. This is alternative to the structure 'struct file_kattr'/'struct fsxattr'.
155155 * As this structure is passed to/from userspace with its size, this can
156156 * be versioned based on the size.
157157 */
mm/shmem.c+2−2
@@ -4183,7 +4183,7 @@ static const char *shmem_get_link(struct dentry *dentry, struct inode *inode, · 4182 unmodified lines
41834183
41844184 #ifdef CONFIG_TMPFS_XATTR
41854185
4186−static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
4186+static int shmem_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
41874187 {
41884188 struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
41894189
@@ -4193,7 +4193,7 @@ static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 3 unmodified lines
41934193 }
41944194
41954195 static int shmem_fileattr_set(struct mnt_idmap *idmap,
4196− struct dentry *dentry, struct fileattr *fa)
4196+ struct dentry *dentry, struct file_kattr *fa)
41974197 {
41984198 struct inode *inode = d_inode(dentry);
41994199 struct shmem_inode_info *info = SHMEM_I(inode);
security/security.c+2−2
@@ -2632,7 +2632,7 @@ void security_inode_post_removexattr(struct dentry *dentry, const char *name) · 2631 unmodified lines
26322632 *
26332633 * Return: Returns 0 if permission is granted.
26342634 */
2635−int security_inode_file_setattr(struct dentry *dentry, struct fileattr *fa)
2635+int security_inode_file_setattr(struct dentry *dentry, struct file_kattr *fa)
26362636 {
26372637 return call_int_hook(inode_file_setattr, dentry, fa);
26382638 }
@@ -2647,7 +2647,7 @@ int security_inode_file_setattr(struct dentry *dentry, struct fileattr *fa) · 8 unmodified lines
26472647 *
26482648 * Return: Returns 0 if permission is granted.
26492649 */
2650−int security_inode_file_getattr(struct dentry *dentry, struct fileattr *fa)
2650+int security_inode_file_getattr(struct dentry *dentry, struct file_kattr *fa)
26512651 {
26522652 return call_int_hook(inode_file_getattr, dentry, fa);
26532653 }
security/selinux/hooks.c+2−2
@@ -3481,13 +3481,13 @@ static int selinux_inode_removexattr(struct mnt_idmap *idmap, · 3480 unmodified lines
34813481 }
34823482
34833483 static int selinux_inode_file_setattr(struct dentry *dentry,
3484− struct fileattr *fa)
3484+ struct file_kattr *fa)
34853485 {
34863486 return dentry_has_perm(current_cred(), dentry, FILE__SETATTR);
34873487 }
34883488
34893489 static int selinux_inode_file_getattr(struct dentry *dentry,
3490− struct fileattr *fa)
3490+ struct file_kattr *fa)
34913491 {
34923492 return dentry_has_perm(current_cred(), dentry, FILE__GETATTR);
34933493 }