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.
Unified · Split
| @@ -87,8 +87,8 @@ prototypes:: · 86 unmodified lines | ||
| 87 | 87 | int (*tmpfile) (struct mnt_idmap *, struct inode *, |
| 88 | 88 | struct file *, umode_t); |
| 89 | 89 | 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); | |
| 92 | 92 | struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); |
| 93 | 93 | struct offset_ctx *(*get_offset_ctx)(struct inode *inode); |
| 94 | 94 | |
| @@ -515,8 +515,8 @@ As of kernel 2.6.22, the following members are defined: · 514 unmodified lines | ||
| 515 | 515 | struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); |
| 516 | 516 | int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int); |
| 517 | 517 | 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); | |
| 520 | 520 | struct offset_ctx *(*get_offset_ctx)(struct inode *inode); |
| 521 | 521 | }; |
| 522 | 522 | |
| @@ -1619,7 +1619,7 @@ static const __maybe_unused unsigned bch_flags_to_xflags[] = { · 1618 unmodified lines | ||
| 1619 | 1619 | }; |
| 1620 | 1620 | |
| 1621 | 1621 | static int bch2_fileattr_get(struct dentry *dentry, |
| 1622 | − struct fileattr *fa) | |
| 1622 | + struct file_kattr *fa) | |
| 1623 | 1623 | { |
| 1624 | 1624 | struct bch_inode_info *inode = to_bch_ei(d_inode(dentry)); |
| 1625 | 1625 | 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 | ||
| 1682 | 1682 | |
| 1683 | 1683 | static int bch2_fileattr_set(struct mnt_idmap *idmap, |
| 1684 | 1684 | struct dentry *dentry, |
| 1685 | − struct fileattr *fa) | |
| 1685 | + struct file_kattr *fa) | |
| 1686 | 1686 | { |
| 1687 | 1687 | struct bch_inode_info *inode = to_bch_ei(d_inode(dentry)); |
| 1688 | 1688 | struct bch_fs *c = inode->v.i_sb->s_fs_info; |
| @@ -245,7 +245,7 @@ static int btrfs_check_ioctl_vol_args2_subvol_name(const struct btrfs_ioctl_vol_ · 244 unmodified lines | ||
| 245 | 245 | * Set flags/xflags from the internal inode flags. The remaining items of |
| 246 | 246 | * fsxattr are zeroed. |
| 247 | 247 | */ |
| 248 | −int btrfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 248 | +int btrfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 249 | 249 | { |
| 250 | 250 | const struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); |
| 251 | 251 | |
| @@ -254,7 +254,7 @@ int btrfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 2 unmodified lines | ||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | int btrfs_fileattr_set(struct mnt_idmap *idmap, |
| 257 | − struct dentry *dentry, struct fileattr *fa) | |
| 257 | + struct dentry *dentry, struct file_kattr *fa) | |
| 258 | 258 | { |
| 259 | 259 | struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); |
| 260 | 260 | struct btrfs_root *root = inode->root; |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | struct file; |
| 9 | 9 | struct dentry; |
| 10 | 10 | struct mnt_idmap; |
| 11 | −struct fileattr; | |
| 11 | +struct file_kattr; | |
| 12 | 12 | struct io_uring_cmd; |
| 13 | 13 | struct btrfs_inode; |
| 14 | 14 | struct btrfs_fs_info; |
| @@ -16,9 +16,9 @@ struct btrfs_ioctl_balance_args; · 1 unmodified line | ||
| 16 | 16 | |
| 17 | 17 | long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 18 | 18 | 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); | |
| 20 | 20 | int btrfs_fileattr_set(struct mnt_idmap *idmap, |
| 21 | − struct dentry *dentry, struct fileattr *fa); | |
| 21 | + struct dentry *dentry, struct file_kattr *fa); | |
| 22 | 22 | int btrfs_ioctl_get_supported_features(void __user *arg); |
| 23 | 23 | void btrfs_sync_inode_flags_to_i_flags(struct btrfs_inode *inode); |
| 24 | 24 | void btrfs_update_ioctl_balance_args(struct btrfs_fs_info *fs_info, |
| @@ -1124,13 +1124,13 @@ out: · 1123 unmodified lines | ||
| 1124 | 1124 | return rc; |
| 1125 | 1125 | } |
| 1126 | 1126 | |
| 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) | |
| 1128 | 1128 | { |
| 1129 | 1129 | return vfs_fileattr_get(ecryptfs_dentry_to_lower(dentry), fa); |
| 1130 | 1130 | } |
| 1131 | 1131 | |
| 1132 | 1132 | static int ecryptfs_fileattr_set(struct mnt_idmap *idmap, |
| 1133 | − struct dentry *dentry, struct fileattr *fa) | |
| 1133 | + struct dentry *dentry, struct file_kattr *fa) | |
| 1134 | 1134 | { |
| 1135 | 1135 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); |
| 1136 | 1136 | int rc; |
| @@ -138,7 +138,7 @@ const struct inode_operations efivarfs_dir_inode_operations = { · 137 unmodified lines | ||
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | 140 | static int |
| 141 | −efivarfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 141 | +efivarfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 142 | 142 | { |
| 143 | 143 | unsigned int i_flags; |
| 144 | 144 | unsigned int flags = 0; |
| @@ -154,7 +154,7 @@ efivarfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 9 unmodified lines | ||
| 154 | 154 | |
| 155 | 155 | static int |
| 156 | 156 | efivarfs_fileattr_set(struct mnt_idmap *idmap, |
| 157 | − struct dentry *dentry, struct fileattr *fa) | |
| 157 | + struct dentry *dentry, struct file_kattr *fa) | |
| 158 | 158 | { |
| 159 | 159 | unsigned int i_flags = 0; |
| 160 | 160 | |
| @@ -750,9 +750,9 @@ extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 749 unmodified lines | ||
| 750 | 750 | u64 start, u64 len); |
| 751 | 751 | |
| 752 | 752 | /* 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); | |
| 754 | 754 | extern int ext2_fileattr_set(struct mnt_idmap *idmap, |
| 755 | − struct dentry *dentry, struct fileattr *fa); | |
| 755 | + struct dentry *dentry, struct file_kattr *fa); | |
| 756 | 756 | extern long ext2_ioctl(struct file *, unsigned int, unsigned long); |
| 757 | 757 | extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long); |
| 758 | 758 | |
| @@ -18,7 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <linux/uaccess.h> |
| 19 | 19 | #include <linux/fileattr.h> |
| 20 | 20 | |
| 21 | −int ext2_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 21 | +int ext2_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 22 | 22 | { |
| 23 | 23 | struct ext2_inode_info *ei = EXT2_I(d_inode(dentry)); |
| 24 | 24 | |
| @@ -28,7 +28,7 @@ int ext2_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 3 unmodified lines | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | int ext2_fileattr_set(struct mnt_idmap *idmap, |
| 31 | − struct dentry *dentry, struct fileattr *fa) | |
| 31 | + struct dentry *dentry, struct file_kattr *fa) | |
| 32 | 32 | { |
| 33 | 33 | struct inode *inode = d_inode(dentry); |
| 34 | 34 | struct ext2_inode_info *ei = EXT2_I(inode); |
| @@ -3103,8 +3103,8 @@ extern int ext4_ind_remove_space(handle_t *handle, struct inode *inode, · 3102 unmodified lines | ||
| 3103 | 3103 | extern long ext4_ioctl(struct file *, unsigned int, unsigned long); |
| 3104 | 3104 | extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long); |
| 3105 | 3105 | 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); | |
| 3108 | 3108 | extern void ext4_reset_inode_seed(struct inode *inode); |
| 3109 | 3109 | int ext4_update_overhead(struct super_block *sb, bool force); |
| 3110 | 3110 | int ext4_force_shutdown(struct super_block *sb, u32 flags); |
| @@ -980,7 +980,7 @@ group_add_out: · 979 unmodified lines | ||
| 980 | 980 | return err; |
| 981 | 981 | } |
| 982 | 982 | |
| 983 | −int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 983 | +int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 984 | 984 | { |
| 985 | 985 | struct inode *inode = d_inode(dentry); |
| 986 | 986 | 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 | ||
| 997 | 997 | } |
| 998 | 998 | |
| 999 | 999 | int ext4_fileattr_set(struct mnt_idmap *idmap, |
| 1000 | − struct dentry *dentry, struct fileattr *fa) | |
| 1000 | + struct dentry *dentry, struct file_kattr *fa) | |
| 1001 | 1001 | { |
| 1002 | 1002 | struct inode *inode = d_inode(dentry); |
| 1003 | 1003 | u32 flags = fa->flags; |
| @@ -3615,9 +3615,9 @@ void f2fs_truncate_data_blocks_range(struct dnode_of_data *dn, int count); · 3614 unmodified lines | ||
| 3615 | 3615 | int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag, |
| 3616 | 3616 | bool readonly, bool need_lock); |
| 3617 | 3617 | 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); | |
| 3619 | 3619 | int f2fs_fileattr_set(struct mnt_idmap *idmap, |
| 3620 | − struct dentry *dentry, struct fileattr *fa); | |
| 3620 | + struct dentry *dentry, struct file_kattr *fa); | |
| 3621 | 3621 | long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
| 3622 | 3622 | long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 3623 | 3623 | int f2fs_transfer_project_quota(struct inode *inode, kprojid_t kprojid); |
| @@ -3356,7 +3356,7 @@ static int f2fs_ioc_setproject(struct inode *inode, __u32 projid) · 3355 unmodified lines | ||
| 3356 | 3356 | } |
| 3357 | 3357 | #endif |
| 3358 | 3358 | |
| 3359 | −int f2fs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 3359 | +int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 3360 | 3360 | { |
| 3361 | 3361 | struct inode *inode = d_inode(dentry); |
| 3362 | 3362 | 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 | ||
| 3380 | 3380 | } |
| 3381 | 3381 | |
| 3382 | 3382 | int f2fs_fileattr_set(struct mnt_idmap *idmap, |
| 3383 | − struct dentry *dentry, struct fileattr *fa) | |
| 3383 | + struct dentry *dentry, struct file_kattr *fa) | |
| 3384 | 3384 | { |
| 3385 | 3385 | struct inode *inode = d_inode(dentry); |
| 3386 | 3386 | u32 fsflags = fa->flags, mask = F2FS_SETTABLE_FS_FL; |
| @@ -17,7 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | * Set ->fsx_xflags, ->fsx_valid and ->flags (translated xflags). All |
| 18 | 18 | * other fields are zeroed. |
| 19 | 19 | */ |
| 20 | −void fileattr_fill_xflags(struct fileattr *fa, u32 xflags) | |
| 20 | +void fileattr_fill_xflags(struct file_kattr *fa, u32 xflags) | |
| 21 | 21 | { |
| 22 | 22 | memset(fa, 0, sizeof(*fa)); |
| 23 | 23 | fa->fsx_valid = true; |
| @@ -47,7 +47,7 @@ EXPORT_SYMBOL(fileattr_fill_xflags); · 23 unmodified lines | ||
| 47 | 47 | * Set ->flags, ->flags_valid and ->fsx_xflags (translated flags). |
| 48 | 48 | * All other fields are zeroed. |
| 49 | 49 | */ |
| 50 | −void fileattr_fill_flags(struct fileattr *fa, u32 flags) | |
| 50 | +void fileattr_fill_flags(struct file_kattr *fa, u32 flags) | |
| 51 | 51 | { |
| 52 | 52 | memset(fa, 0, sizeof(*fa)); |
| 53 | 53 | fa->flags_valid = true; |
| @@ -78,7 +78,7 @@ EXPORT_SYMBOL(fileattr_fill_flags); · 24 unmodified lines | ||
| 78 | 78 | * |
| 79 | 79 | * Return: 0 on success, or a negative error on failure. |
| 80 | 80 | */ |
| 81 | −int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 81 | +int vfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 82 | 82 | { |
| 83 | 83 | struct inode *inode = d_inode(dentry); |
| 84 | 84 | int error; |
| @@ -94,7 +94,7 @@ int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 9 unmodified lines | ||
| 94 | 94 | } |
| 95 | 95 | EXPORT_SYMBOL(vfs_fileattr_get); |
| 96 | 96 | |
| 97 | −static void fileattr_to_file_attr(const struct fileattr *fa, | |
| 97 | +static void fileattr_to_file_attr(const struct file_kattr *fa, | |
| 98 | 98 | struct file_attr *fattr) |
| 99 | 99 | { |
| 100 | 100 | __u32 mask = FS_XFLAGS_MASK; |
| @@ -114,7 +114,7 @@ static void fileattr_to_file_attr(const struct fileattr *fa, · 13 unmodified lines | ||
| 114 | 114 | * |
| 115 | 115 | * Return: 0 on success, or -EFAULT on failure. |
| 116 | 116 | */ |
| 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) | |
| 118 | 118 | { |
| 119 | 119 | struct fsxattr xfa; |
| 120 | 120 | __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 | ||
| 134 | 134 | EXPORT_SYMBOL(copy_fsxattr_to_user); |
| 135 | 135 | |
| 136 | 136 | static int file_attr_to_fileattr(const struct file_attr *fattr, |
| 137 | − struct fileattr *fa) | |
| 137 | + struct file_kattr *fa) | |
| 138 | 138 | { |
| 139 | 139 | __u32 mask = FS_XFLAGS_MASK; |
| 140 | 140 | |
| @@ -150,7 +150,7 @@ static int file_attr_to_fileattr(const struct file_attr *fattr, · 9 unmodified lines | ||
| 150 | 150 | return 0; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | −static int copy_fsxattr_from_user(struct fileattr *fa, | |
| 153 | +static int copy_fsxattr_from_user(struct file_kattr *fa, | |
| 154 | 154 | struct fsxattr __user *ufa) |
| 155 | 155 | { |
| 156 | 156 | struct fsxattr xfa; |
| @@ -179,8 +179,8 @@ static int copy_fsxattr_from_user(struct fileattr *fa, · 22 unmodified lines | ||
| 179 | 179 | * Note: must be called with inode lock held. |
| 180 | 180 | */ |
| 181 | 181 | 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) | |
| 184 | 184 | { |
| 185 | 185 | int err; |
| 186 | 186 | |
| @@ -263,10 +263,10 @@ static int fileattr_set_prepare(struct inode *inode, · 76 unmodified lines | ||
| 263 | 263 | * Return: 0 on success, or a negative error on failure. |
| 264 | 264 | */ |
| 265 | 265 | int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry, |
| 266 | − struct fileattr *fa) | |
| 266 | + struct file_kattr *fa) | |
| 267 | 267 | { |
| 268 | 268 | struct inode *inode = d_inode(dentry); |
| 269 | − struct fileattr old_ma = {}; | |
| 269 | + struct file_kattr old_ma = {}; | |
| 270 | 270 | int err; |
| 271 | 271 | |
| 272 | 272 | if (!inode->i_op->fileattr_set) |
| @@ -308,7 +308,7 @@ EXPORT_SYMBOL(vfs_fileattr_set); · 35 unmodified lines | ||
| 308 | 308 | |
| 309 | 309 | int ioctl_getflags(struct file *file, unsigned int __user *argp) |
| 310 | 310 | { |
| 311 | − struct fileattr fa = { .flags_valid = true }; /* hint only */ | |
| 311 | + struct file_kattr fa = { .flags_valid = true }; /* hint only */ | |
| 312 | 312 | int err; |
| 313 | 313 | |
| 314 | 314 | 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 | ||
| 324 | 324 | { |
| 325 | 325 | struct mnt_idmap *idmap = file_mnt_idmap(file); |
| 326 | 326 | struct dentry *dentry = file->f_path.dentry; |
| 327 | − struct fileattr fa; | |
| 327 | + struct file_kattr fa; | |
| 328 | 328 | unsigned int flags; |
| 329 | 329 | int err; |
| 330 | 330 | |
| @@ -345,7 +345,7 @@ EXPORT_SYMBOL(ioctl_setflags); · 14 unmodified lines | ||
| 345 | 345 | |
| 346 | 346 | int ioctl_fsgetxattr(struct file *file, void __user *argp) |
| 347 | 347 | { |
| 348 | − struct fileattr fa = { .fsx_valid = true }; /* hint only */ | |
| 348 | + struct file_kattr fa = { .fsx_valid = true }; /* hint only */ | |
| 349 | 349 | int err; |
| 350 | 350 | |
| 351 | 351 | 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 | ||
| 362 | 362 | { |
| 363 | 363 | struct mnt_idmap *idmap = file_mnt_idmap(file); |
| 364 | 364 | struct dentry *dentry = file->f_path.dentry; |
| 365 | − struct fileattr fa; | |
| 365 | + struct file_kattr fa; | |
| 366 | 366 | int err; |
| 367 | 367 | |
| 368 | 368 | err = copy_fsxattr_from_user(&fa, argp); |
| @@ -387,7 +387,7 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename, · 18 unmodified lines | ||
| 387 | 387 | struct filename *name __free(putname) = NULL; |
| 388 | 388 | unsigned int lookup_flags = 0; |
| 389 | 389 | struct file_attr fattr; |
| 390 | − struct fileattr fa; | |
| 390 | + struct file_kattr fa; | |
| 391 | 391 | int error; |
| 392 | 392 | |
| 393 | 393 | 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 | ||
| 442 | 442 | struct filename *name __free(putname) = NULL; |
| 443 | 443 | unsigned int lookup_flags = 0; |
| 444 | 444 | struct file_attr fattr; |
| 445 | − struct fileattr fa; | |
| 445 | + struct file_kattr fa; | |
| 446 | 446 | int error; |
| 447 | 447 | |
| 448 | 448 | BUILD_BUG_ON(sizeof(struct file_attr) < FILE_ATTR_SIZE_VER0); |
| @@ -1486,9 +1486,9 @@ void fuse_dax_cancel_work(struct fuse_conn *fc); · 1485 unmodified lines | ||
| 1486 | 1486 | long fuse_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 1487 | 1487 | long fuse_file_compat_ioctl(struct file *file, unsigned int cmd, |
| 1488 | 1488 | 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); | |
| 1490 | 1490 | int fuse_fileattr_set(struct mnt_idmap *idmap, |
| 1491 | − struct dentry *dentry, struct fileattr *fa); | |
| 1491 | + struct dentry *dentry, struct file_kattr *fa); | |
| 1492 | 1492 | |
| 1493 | 1493 | /* iomode.c */ |
| 1494 | 1494 | int fuse_file_cached_io_open(struct inode *inode, struct fuse_file *ff); |
| @@ -502,7 +502,7 @@ static void fuse_priv_ioctl_cleanup(struct inode *inode, struct fuse_file *ff) · 501 unmodified lines | ||
| 502 | 502 | fuse_file_release(inode, ff, O_RDONLY, NULL, S_ISDIR(inode->i_mode)); |
| 503 | 503 | } |
| 504 | 504 | |
| 505 | −int fuse_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 505 | +int fuse_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 506 | 506 | { |
| 507 | 507 | struct inode *inode = d_inode(dentry); |
| 508 | 508 | struct fuse_file *ff; |
| @@ -542,7 +542,7 @@ cleanup: · 33 unmodified lines | ||
| 542 | 542 | } |
| 543 | 543 | |
| 544 | 544 | int fuse_fileattr_set(struct mnt_idmap *idmap, |
| 545 | − struct dentry *dentry, struct fileattr *fa) | |
| 545 | + struct dentry *dentry, struct file_kattr *fa) | |
| 546 | 546 | { |
| 547 | 547 | struct inode *inode = d_inode(dentry); |
| 548 | 548 | struct fuse_file *ff; |
| @@ -155,7 +155,7 @@ static inline u32 gfs2_gfsflags_to_fsflags(struct inode *inode, u32 gfsflags) · 154 unmodified lines | ||
| 155 | 155 | return fsflags; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | −int gfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 158 | +int gfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 159 | 159 | { |
| 160 | 160 | struct inode *inode = d_inode(dentry); |
| 161 | 161 | struct gfs2_inode *ip = GFS2_I(inode); |
| @@ -276,7 +276,7 @@ out: · 114 unmodified lines | ||
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | int gfs2_fileattr_set(struct mnt_idmap *idmap, |
| 279 | − struct dentry *dentry, struct fileattr *fa) | |
| 279 | + struct dentry *dentry, struct file_kattr *fa) | |
| 280 | 280 | { |
| 281 | 281 | struct inode *inode = d_inode(dentry); |
| 282 | 282 | u32 fsflags = fa->flags, gfsflags = 0; |
| @@ -107,9 +107,9 @@ loff_t gfs2_seek_hole(struct file *file, loff_t offset); · 106 unmodified lines | ||
| 107 | 107 | extern const struct file_operations gfs2_file_fops_nolock; |
| 108 | 108 | extern const struct file_operations gfs2_dir_fops_nolock; |
| 109 | 109 | |
| 110 | −int gfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa); | |
| 110 | +int gfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa); | |
| 111 | 111 | int gfs2_fileattr_set(struct mnt_idmap *idmap, |
| 112 | − struct dentry *dentry, struct fileattr *fa); | |
| 112 | + struct dentry *dentry, struct file_kattr *fa); | |
| 113 | 113 | void gfs2_set_inode_flags(struct inode *inode); |
| 114 | 114 | |
| 115 | 115 | #ifdef CONFIG_GFS2_FS_LOCKING_DLM |
| @@ -489,9 +489,9 @@ int hfsplus_getattr(struct mnt_idmap *idmap, const struct path *path, · 488 unmodified lines | ||
| 489 | 489 | unsigned int query_flags); |
| 490 | 490 | int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, |
| 491 | 491 | 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); | |
| 493 | 493 | int hfsplus_fileattr_set(struct mnt_idmap *idmap, |
| 494 | − struct dentry *dentry, struct fileattr *fa); | |
| 494 | + struct dentry *dentry, struct file_kattr *fa); | |
| 495 | 495 | |
| 496 | 496 | /* ioctl.c */ |
| 497 | 497 | long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
| @@ -654,7 +654,7 @@ out: · 653 unmodified lines | ||
| 654 | 654 | return res; |
| 655 | 655 | } |
| 656 | 656 | |
| 657 | −int hfsplus_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 657 | +int hfsplus_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 658 | 658 | { |
| 659 | 659 | struct inode *inode = d_inode(dentry); |
| 660 | 660 | 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 | ||
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | int hfsplus_fileattr_set(struct mnt_idmap *idmap, |
| 676 | − struct dentry *dentry, struct fileattr *fa) | |
| 676 | + struct dentry *dentry, struct file_kattr *fa) | |
| 677 | 677 | { |
| 678 | 678 | struct inode *inode = d_inode(dentry); |
| 679 | 679 | struct hfsplus_inode_info *hip = HFSPLUS_I(inode); |
| @@ -57,7 +57,7 @@ static long jfs_map_ext2(unsigned long flags, int from) · 56 unmodified lines | ||
| 57 | 57 | return mapped; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | −int jfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 60 | +int jfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 61 | 61 | { |
| 62 | 62 | struct jfs_inode_info *jfs_inode = JFS_IP(d_inode(dentry)); |
| 63 | 63 | 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 | ||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | int jfs_fileattr_set(struct mnt_idmap *idmap, |
| 74 | − struct dentry *dentry, struct fileattr *fa) | |
| 74 | + struct dentry *dentry, struct file_kattr *fa) | |
| 75 | 75 | { |
| 76 | 76 | struct inode *inode = d_inode(dentry); |
| 77 | 77 | struct jfs_inode_info *jfs_inode = JFS_IP(inode); |
| @@ -9,9 +9,9 @@ struct fid; · 8 unmodified lines | ||
| 9 | 9 | |
| 10 | 10 | extern struct inode *ialloc(struct inode *, umode_t); |
| 11 | 11 | 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); | |
| 13 | 13 | extern int jfs_fileattr_set(struct mnt_idmap *idmap, |
| 14 | − struct dentry *dentry, struct fileattr *fa); | |
| 14 | + struct dentry *dentry, struct file_kattr *fa); | |
| 15 | 15 | extern long jfs_ioctl(struct file *, unsigned int, unsigned long); |
| 16 | 16 | extern struct inode *jfs_iget(struct super_block *, unsigned long); |
| 17 | 17 | extern int jfs_commit_inode(struct inode *, int); |
| @@ -118,7 +118,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, · 117 unmodified lines | ||
| 118 | 118 | * |
| 119 | 119 | * Return: always 0 as success. |
| 120 | 120 | */ |
| 121 | −int nilfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 121 | +int nilfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 122 | 122 | { |
| 123 | 123 | struct inode *inode = d_inode(dentry); |
| 124 | 124 | |
| @@ -136,7 +136,7 @@ int nilfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 11 unmodified lines | ||
| 136 | 136 | * Return: 0 on success, or a negative error code on failure. |
| 137 | 137 | */ |
| 138 | 138 | int nilfs_fileattr_set(struct mnt_idmap *idmap, |
| 139 | − struct dentry *dentry, struct fileattr *fa) | |
| 139 | + struct dentry *dentry, struct file_kattr *fa) | |
| 140 | 140 | { |
| 141 | 141 | struct inode *inode = d_inode(dentry); |
| 142 | 142 | struct nilfs_transaction_info ti; |
| @@ -268,9 +268,9 @@ int nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, · 267 unmodified lines | ||
| 268 | 268 | extern int nilfs_sync_file(struct file *, loff_t, loff_t, int); |
| 269 | 269 | |
| 270 | 270 | /* 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); | |
| 272 | 272 | int nilfs_fileattr_set(struct mnt_idmap *idmap, |
| 273 | − struct dentry *dentry, struct fileattr *fa); | |
| 273 | + struct dentry *dentry, struct file_kattr *fa); | |
| 274 | 274 | long nilfs_ioctl(struct file *, unsigned int, unsigned long); |
| 275 | 275 | long nilfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 276 | 276 | int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *, struct nilfs_argv *, |
| @@ -62,7 +62,7 @@ static inline int o2info_coherent(struct ocfs2_info_request *req) · 61 unmodified lines | ||
| 62 | 62 | return (!(req->ir_flags & OCFS2_INFO_FL_NON_COHERENT)); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | −int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 65 | +int ocfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 66 | 66 | { |
| 67 | 67 | struct inode *inode = d_inode(dentry); |
| 68 | 68 | unsigned int flags; |
| @@ -83,7 +83,7 @@ int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 14 unmodified lines | ||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | int ocfs2_fileattr_set(struct mnt_idmap *idmap, |
| 86 | − struct dentry *dentry, struct fileattr *fa) | |
| 86 | + struct dentry *dentry, struct file_kattr *fa) | |
| 87 | 87 | { |
| 88 | 88 | struct inode *inode = d_inode(dentry); |
| 89 | 89 | unsigned int flags = fa->flags; |
| @@ -11,9 +11,9 @@ · 10 unmodified lines | ||
| 11 | 11 | #ifndef OCFS2_IOCTL_PROTO_H |
| 12 | 12 | #define OCFS2_IOCTL_PROTO_H |
| 13 | 13 | |
| 14 | −int ocfs2_fileattr_get(struct dentry *dentry, struct fileattr *fa); | |
| 14 | +int ocfs2_fileattr_get(struct dentry *dentry, struct file_kattr *fa); | |
| 15 | 15 | int ocfs2_fileattr_set(struct mnt_idmap *idmap, |
| 16 | − struct dentry *dentry, struct fileattr *fa); | |
| 16 | + struct dentry *dentry, struct file_kattr *fa); | |
| 17 | 17 | long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
| 18 | 18 | long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg); |
| 19 | 19 | |
| @@ -887,7 +887,7 @@ int orangefs_update_time(struct inode *inode, int flags) · 886 unmodified lines | ||
| 887 | 887 | return __orangefs_setattr(inode, &iattr); |
| 888 | 888 | } |
| 889 | 889 | |
| 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) | |
| 891 | 891 | { |
| 892 | 892 | u64 val = 0; |
| 893 | 893 | int ret; |
| @@ -908,7 +908,7 @@ static int orangefs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 14 unmodified lines | ||
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | static int orangefs_fileattr_set(struct mnt_idmap *idmap, |
| 911 | − struct dentry *dentry, struct fileattr *fa) | |
| 911 | + struct dentry *dentry, struct file_kattr *fa) | |
| 912 | 912 | { |
| 913 | 913 | u64 val = 0; |
| 914 | 914 | |
| @@ -171,8 +171,8 @@ out: · 170 unmodified lines | ||
| 171 | 171 | static int ovl_copy_fileattr(struct inode *inode, const struct path *old, |
| 172 | 172 | const struct path *new) |
| 173 | 173 | { |
| 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 }; | |
| 176 | 176 | int err; |
| 177 | 177 | |
| 178 | 178 | err = ovl_real_fileattr_get(old, &oldfa); |
| @@ -610,7 +610,7 @@ static int ovl_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 609 unmodified lines | ||
| 610 | 610 | * Introducing security_inode_fileattr_get/set() hooks would solve this issue |
| 611 | 611 | * properly. |
| 612 | 612 | */ |
| 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, | |
| 614 | 614 | bool set) |
| 615 | 615 | { |
| 616 | 616 | struct file *file; |
| @@ -637,7 +637,7 @@ static int ovl_security_fileattr(const struct path *realpath, struct fileattr *f · 20 unmodified lines | ||
| 637 | 637 | return err; |
| 638 | 638 | } |
| 639 | 639 | |
| 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) | |
| 641 | 641 | { |
| 642 | 642 | int err; |
| 643 | 643 | |
| @@ -649,7 +649,7 @@ int ovl_real_fileattr_set(const struct path *realpath, struct fileattr *fa) · 5 unmodified lines | ||
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | int ovl_fileattr_set(struct mnt_idmap *idmap, |
| 652 | − struct dentry *dentry, struct fileattr *fa) | |
| 652 | + struct dentry *dentry, struct file_kattr *fa) | |
| 653 | 653 | { |
| 654 | 654 | struct inode *inode = d_inode(dentry); |
| 655 | 655 | struct path upperpath; |
| @@ -697,7 +697,7 @@ out: · 41 unmodified lines | ||
| 697 | 697 | } |
| 698 | 698 | |
| 699 | 699 | /* 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) | |
| 701 | 701 | { |
| 702 | 702 | BUILD_BUG_ON(OVL_PROT_FS_FLAGS_MASK & ~FS_COMMON_FL); |
| 703 | 703 | 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 | ||
| 712 | 712 | } |
| 713 | 713 | } |
| 714 | 714 | |
| 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) | |
| 716 | 716 | { |
| 717 | 717 | int err; |
| 718 | 718 | |
| @@ -723,7 +723,7 @@ int ovl_real_fileattr_get(const struct path *realpath, struct fileattr *fa) · 4 unmodified lines | ||
| 723 | 723 | return vfs_fileattr_get(realpath->dentry, fa); |
| 724 | 724 | } |
| 725 | 725 | |
| 726 | −int ovl_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 726 | +int ovl_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 727 | 727 | { |
| 728 | 728 | struct inode *inode = d_inode(dentry); |
| 729 | 729 | struct path realpath; |
| @@ -815,7 +815,7 @@ void ovl_copyattr(struct inode *to); · 814 unmodified lines | ||
| 815 | 815 | |
| 816 | 816 | void ovl_check_protattr(struct inode *inode, struct dentry *upper); |
| 817 | 817 | int ovl_set_protattr(struct inode *inode, struct dentry *upper, |
| 818 | − struct fileattr *fa); | |
| 818 | + struct file_kattr *fa); | |
| 819 | 819 | |
| 820 | 820 | static inline void ovl_copyflags(struct inode *from, struct inode *to) |
| 821 | 821 | { |
| @@ -847,11 +847,11 @@ struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir, · 25 unmodified lines | ||
| 847 | 847 | |
| 848 | 848 | /* file.c */ |
| 849 | 849 | 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); | |
| 853 | 853 | int ovl_fileattr_set(struct mnt_idmap *idmap, |
| 854 | − struct dentry *dentry, struct fileattr *fa); | |
| 854 | + struct dentry *dentry, struct file_kattr *fa); | |
| 855 | 855 | struct ovl_file; |
| 856 | 856 | struct ovl_file *ovl_file_alloc(struct file *realfile); |
| 857 | 857 | void ovl_file_free(struct ovl_file *of); |
| @@ -959,7 +959,7 @@ void ovl_check_protattr(struct inode *inode, struct dentry *upper) · 958 unmodified lines | ||
| 959 | 959 | } |
| 960 | 960 | |
| 961 | 961 | int ovl_set_protattr(struct inode *inode, struct dentry *upper, |
| 962 | − struct fileattr *fa) | |
| 962 | + struct file_kattr *fa) | |
| 963 | 963 | { |
| 964 | 964 | struct ovl_fs *ofs = OVL_FS(inode->i_sb); |
| 965 | 965 | char buf[OVL_PROTATTR_MAX]; |
| @@ -130,7 +130,7 @@ static int setflags(struct inode *inode, int flags) · 129 unmodified lines | ||
| 130 | 130 | return err; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | −int ubifs_fileattr_get(struct dentry *dentry, struct fileattr *fa) | |
| 133 | +int ubifs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | |
| 134 | 134 | { |
| 135 | 135 | struct inode *inode = d_inode(dentry); |
| 136 | 136 | int flags = ubifs2ioctl(ubifs_inode(inode)->flags); |
| @@ -145,7 +145,7 @@ int ubifs_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 8 unmodified lines | ||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | int ubifs_fileattr_set(struct mnt_idmap *idmap, |
| 148 | − struct dentry *dentry, struct fileattr *fa) | |
| 148 | + struct dentry *dentry, struct file_kattr *fa) | |
| 149 | 149 | { |
| 150 | 150 | struct inode *inode = d_inode(dentry); |
| 151 | 151 | int flags = fa->flags; |
| @@ -2073,9 +2073,9 @@ int ubifs_recover_size(struct ubifs_info *c, bool in_place); · 2072 unmodified lines | ||
| 2073 | 2073 | void ubifs_destroy_size_tree(struct ubifs_info *c); |
| 2074 | 2074 | |
| 2075 | 2075 | /* 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); | |
| 2077 | 2077 | int ubifs_fileattr_set(struct mnt_idmap *idmap, |
| 2078 | − struct dentry *dentry, struct fileattr *fa); | |
| 2078 | + struct dentry *dentry, struct file_kattr *fa); | |
| 2079 | 2079 | long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 2080 | 2080 | void ubifs_set_inode_flags(struct inode *inode); |
| 2081 | 2081 | #ifdef CONFIG_COMPAT |
| @@ -444,7 +444,7 @@ static void · 443 unmodified lines | ||
| 444 | 444 | xfs_fill_fsxattr( |
| 445 | 445 | struct xfs_inode *ip, |
| 446 | 446 | int whichfork, |
| 447 | − struct fileattr *fa) | |
| 447 | + struct file_kattr *fa) | |
| 448 | 448 | { |
| 449 | 449 | struct xfs_mount *mp = ip->i_mount; |
| 450 | 450 | struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); |
| @@ -496,7 +496,7 @@ xfs_ioc_fsgetxattra( · 45 unmodified lines | ||
| 496 | 496 | xfs_inode_t *ip, |
| 497 | 497 | void __user *arg) |
| 498 | 498 | { |
| 499 | − struct fileattr fa; | |
| 499 | + struct file_kattr fa; | |
| 500 | 500 | |
| 501 | 501 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
| 502 | 502 | xfs_fill_fsxattr(ip, XFS_ATTR_FORK, &fa); |
| @@ -508,7 +508,7 @@ xfs_ioc_fsgetxattra( · 5 unmodified lines | ||
| 508 | 508 | int |
| 509 | 509 | xfs_fileattr_get( |
| 510 | 510 | struct dentry *dentry, |
| 511 | − struct fileattr *fa) | |
| 511 | + struct file_kattr *fa) | |
| 512 | 512 | { |
| 513 | 513 | struct xfs_inode *ip = XFS_I(d_inode(dentry)); |
| 514 | 514 | |
| @@ -526,7 +526,7 @@ static int · 11 unmodified lines | ||
| 526 | 526 | xfs_ioctl_setattr_xflags( |
| 527 | 527 | struct xfs_trans *tp, |
| 528 | 528 | struct xfs_inode *ip, |
| 529 | − struct fileattr *fa) | |
| 529 | + struct file_kattr *fa) | |
| 530 | 530 | { |
| 531 | 531 | struct xfs_mount *mp = ip->i_mount; |
| 532 | 532 | bool rtflag = (fa->fsx_xflags & FS_XFLAG_REALTIME); |
| @@ -582,7 +582,7 @@ xfs_ioctl_setattr_xflags( · 49 unmodified lines | ||
| 582 | 582 | static void |
| 583 | 583 | xfs_ioctl_setattr_prepare_dax( |
| 584 | 584 | struct xfs_inode *ip, |
| 585 | − struct fileattr *fa) | |
| 585 | + struct file_kattr *fa) | |
| 586 | 586 | { |
| 587 | 587 | struct xfs_mount *mp = ip->i_mount; |
| 588 | 588 | struct inode *inode = VFS_I(ip); |
| @@ -642,7 +642,7 @@ out_error: · 53 unmodified lines | ||
| 642 | 642 | static int |
| 643 | 643 | xfs_ioctl_setattr_check_extsize( |
| 644 | 644 | struct xfs_inode *ip, |
| 645 | − struct fileattr *fa) | |
| 645 | + struct file_kattr *fa) | |
| 646 | 646 | { |
| 647 | 647 | struct xfs_mount *mp = ip->i_mount; |
| 648 | 648 | xfs_failaddr_t failaddr; |
| @@ -684,7 +684,7 @@ xfs_ioctl_setattr_check_extsize( · 35 unmodified lines | ||
| 684 | 684 | static int |
| 685 | 685 | xfs_ioctl_setattr_check_cowextsize( |
| 686 | 686 | struct xfs_inode *ip, |
| 687 | − struct fileattr *fa) | |
| 687 | + struct file_kattr *fa) | |
| 688 | 688 | { |
| 689 | 689 | struct xfs_mount *mp = ip->i_mount; |
| 690 | 690 | xfs_failaddr_t failaddr; |
| @@ -709,7 +709,7 @@ xfs_ioctl_setattr_check_cowextsize( · 18 unmodified lines | ||
| 709 | 709 | static int |
| 710 | 710 | xfs_ioctl_setattr_check_projid( |
| 711 | 711 | struct xfs_inode *ip, |
| 712 | − struct fileattr *fa) | |
| 712 | + struct file_kattr *fa) | |
| 713 | 713 | { |
| 714 | 714 | if (!fa->fsx_valid) |
| 715 | 715 | return 0; |
| @@ -725,7 +725,7 @@ int · 9 unmodified lines | ||
| 725 | 725 | xfs_fileattr_set( |
| 726 | 726 | struct mnt_idmap *idmap, |
| 727 | 727 | struct dentry *dentry, |
| 728 | − struct fileattr *fa) | |
| 728 | + struct file_kattr *fa) | |
| 729 | 729 | { |
| 730 | 730 | struct xfs_inode *ip = XFS_I(d_inode(dentry)); |
| 731 | 731 | struct xfs_mount *mp = ip->i_mount; |
| @@ -17,13 +17,13 @@ xfs_ioc_swapext( · 16 unmodified lines | ||
| 17 | 17 | extern int |
| 18 | 18 | xfs_fileattr_get( |
| 19 | 19 | struct dentry *dentry, |
| 20 | − struct fileattr *fa); | |
| 20 | + struct file_kattr *fa); | |
| 21 | 21 | |
| 22 | 22 | extern int |
| 23 | 23 | xfs_fileattr_set( |
| 24 | 24 | struct mnt_idmap *idmap, |
| 25 | 25 | struct dentry *dentry, |
| 26 | − struct fileattr *fa); | |
| 26 | + struct file_kattr *fa); | |
| 27 | 27 | |
| 28 | 28 | extern long |
| 29 | 29 | xfs_file_ioctl( |
| @@ -40,7 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | * is handled by the VFS helpers, so filesystems are free to implement just one |
| 41 | 41 | * or both of these sub-interfaces. |
| 42 | 42 | */ |
| 43 | −struct fileattr { | |
| 43 | +struct file_kattr { | |
| 44 | 44 | u32 flags; /* flags (FS_IOC_GETFLAGS/FS_IOC_SETFLAGS) */ |
| 45 | 45 | /* struct fsxattr: */ |
| 46 | 46 | u32 fsx_xflags; /* xflags field value (get/set) */ |
| @@ -53,10 +53,10 @@ struct fileattr { · 6 unmodified lines | ||
| 53 | 53 | bool fsx_valid:1; |
| 54 | 54 | }; |
| 55 | 55 | |
| 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); | |
| 57 | 57 | |
| 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); | |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * fileattr_has_fsx - check for extended flags/attributes |
| @@ -65,16 +65,16 @@ void fileattr_fill_flags(struct fileattr *fa, u32 flags); · 2 unmodified lines | ||
| 65 | 65 | * Return: true if any attributes are present that are not represented in |
| 66 | 66 | * ->flags. |
| 67 | 67 | */ |
| 68 | −static inline bool fileattr_has_fsx(const struct fileattr *fa) | |
| 68 | +static inline bool fileattr_has_fsx(const struct file_kattr *fa) | |
| 69 | 69 | { |
| 70 | 70 | return fa->fsx_valid && |
| 71 | 71 | ((fa->fsx_xflags & ~FS_XFLAG_COMMON) || fa->fsx_extsize != 0 || |
| 72 | 72 | fa->fsx_projid != 0 || fa->fsx_cowextsize != 0); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | −int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa); | |
| 75 | +int vfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa); | |
| 76 | 76 | int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry, |
| 77 | − struct fileattr *fa); | |
| 77 | + struct file_kattr *fa); | |
| 78 | 78 | int ioctl_getflags(struct file *file, unsigned int __user *argp); |
| 79 | 79 | int ioctl_setflags(struct file *file, unsigned int __user *argp); |
| 80 | 80 | int ioctl_fsgetxattr(struct file *file, void __user *argp); |
| @@ -80,7 +80,7 @@ struct fsnotify_mark_connector; · 79 unmodified lines | ||
| 80 | 80 | struct fsnotify_sb_info; |
| 81 | 81 | struct fs_context; |
| 82 | 82 | struct fs_parameter_spec; |
| 83 | −struct fileattr; | |
| 83 | +struct file_kattr; | |
| 84 | 84 | struct iomap_ops; |
| 85 | 85 | |
| 86 | 86 | extern void __init inode_init(void); |
| @@ -2254,8 +2254,8 @@ struct inode_operations { · 2167 unmodified lines | ||
| 2254 | 2254 | int (*set_acl)(struct mnt_idmap *, struct dentry *, |
| 2255 | 2255 | struct posix_acl *, int); |
| 2256 | 2256 | 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); | |
| 2259 | 2259 | struct offset_ctx *(*get_offset_ctx)(struct inode *inode); |
| 2260 | 2260 | } ____cacheline_aligned; |
| 2261 | 2261 | |
| @@ -157,8 +157,8 @@ LSM_HOOK(int, 0, inode_removexattr, struct mnt_idmap *idmap, · 156 unmodified lines | ||
| 157 | 157 | struct dentry *dentry, const char *name) |
| 158 | 158 | LSM_HOOK(void, LSM_RET_VOID, inode_post_removexattr, struct dentry *dentry, |
| 159 | 159 | 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) | |
| 162 | 162 | LSM_HOOK(int, 0, inode_set_acl, struct mnt_idmap *idmap, |
| 163 | 163 | struct dentry *dentry, const char *acl_name, struct posix_acl *kacl) |
| 164 | 164 | LSM_HOOK(void, LSM_RET_VOID, inode_post_set_acl, struct dentry *dentry, |
| @@ -452,9 +452,9 @@ int security_inode_removexattr(struct mnt_idmap *idmap, · 451 unmodified lines | ||
| 452 | 452 | struct dentry *dentry, const char *name); |
| 453 | 453 | void security_inode_post_removexattr(struct dentry *dentry, const char *name); |
| 454 | 454 | int security_inode_file_setattr(struct dentry *dentry, |
| 455 | − struct fileattr *fa); | |
| 455 | + struct file_kattr *fa); | |
| 456 | 456 | int security_inode_file_getattr(struct dentry *dentry, |
| 457 | − struct fileattr *fa); | |
| 457 | + struct file_kattr *fa); | |
| 458 | 458 | int security_inode_need_killpriv(struct dentry *dentry); |
| 459 | 459 | int security_inode_killpriv(struct mnt_idmap *idmap, struct dentry *dentry); |
| 460 | 460 | 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 | ||
| 1057 | 1057 | { } |
| 1058 | 1058 | |
| 1059 | 1059 | static inline int security_inode_file_setattr(struct dentry *dentry, |
| 1060 | − struct fileattr *fa) | |
| 1060 | + struct file_kattr *fa) | |
| 1061 | 1061 | { |
| 1062 | 1062 | return 0; |
| 1063 | 1063 | } |
| 1064 | 1064 | |
| 1065 | 1065 | static inline int security_inode_file_getattr(struct dentry *dentry, |
| 1066 | − struct fileattr *fa) | |
| 1066 | + struct file_kattr *fa) | |
| 1067 | 1067 | { |
| 1068 | 1068 | return 0; |
| 1069 | 1069 | } |
| @@ -151,7 +151,7 @@ struct fsxattr { · 150 unmodified lines | ||
| 151 | 151 | /* |
| 152 | 152 | * Variable size structure for file_[sg]et_attr(). |
| 153 | 153 | * |
| 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'. | |
| 155 | 155 | * As this structure is passed to/from userspace with its size, this can |
| 156 | 156 | * be versioned based on the size. |
| 157 | 157 | */ |
| @@ -4183,7 +4183,7 @@ static const char *shmem_get_link(struct dentry *dentry, struct inode *inode, · 4182 unmodified lines | ||
| 4183 | 4183 | |
| 4184 | 4184 | #ifdef CONFIG_TMPFS_XATTR |
| 4185 | 4185 | |
| 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) | |
| 4187 | 4187 | { |
| 4188 | 4188 | struct shmem_inode_info *info = SHMEM_I(d_inode(dentry)); |
| 4189 | 4189 | |
| @@ -4193,7 +4193,7 @@ static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa) · 3 unmodified lines | ||
| 4193 | 4193 | } |
| 4194 | 4194 | |
| 4195 | 4195 | static int shmem_fileattr_set(struct mnt_idmap *idmap, |
| 4196 | − struct dentry *dentry, struct fileattr *fa) | |
| 4196 | + struct dentry *dentry, struct file_kattr *fa) | |
| 4197 | 4197 | { |
| 4198 | 4198 | struct inode *inode = d_inode(dentry); |
| 4199 | 4199 | struct shmem_inode_info *info = SHMEM_I(inode); |
| @@ -2632,7 +2632,7 @@ void security_inode_post_removexattr(struct dentry *dentry, const char *name) · 2631 unmodified lines | ||
| 2632 | 2632 | * |
| 2633 | 2633 | * Return: Returns 0 if permission is granted. |
| 2634 | 2634 | */ |
| 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) | |
| 2636 | 2636 | { |
| 2637 | 2637 | return call_int_hook(inode_file_setattr, dentry, fa); |
| 2638 | 2638 | } |
| @@ -2647,7 +2647,7 @@ int security_inode_file_setattr(struct dentry *dentry, struct fileattr *fa) · 8 unmodified lines | ||
| 2647 | 2647 | * |
| 2648 | 2648 | * Return: Returns 0 if permission is granted. |
| 2649 | 2649 | */ |
| 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) | |
| 2651 | 2651 | { |
| 2652 | 2652 | return call_int_hook(inode_file_getattr, dentry, fa); |
| 2653 | 2653 | } |
| @@ -3481,13 +3481,13 @@ static int selinux_inode_removexattr(struct mnt_idmap *idmap, · 3480 unmodified lines | ||
| 3481 | 3481 | } |
| 3482 | 3482 | |
| 3483 | 3483 | static int selinux_inode_file_setattr(struct dentry *dentry, |
| 3484 | − struct fileattr *fa) | |
| 3484 | + struct file_kattr *fa) | |
| 3485 | 3485 | { |
| 3486 | 3486 | return dentry_has_perm(current_cred(), dentry, FILE__SETATTR); |
| 3487 | 3487 | } |
| 3488 | 3488 | |
| 3489 | 3489 | static int selinux_inode_file_getattr(struct dentry *dentry, |
| 3490 | − struct fileattr *fa) | |
| 3490 | + struct file_kattr *fa) | |
| 3491 | 3491 | { |
| 3492 | 3492 | return dentry_has_perm(current_cred(), dentry, FILE__GETATTR); |
| 3493 | 3493 | } |