Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: pass a btrfs_inode to btrfs_ioctl_send()

Pass a struct btrfs_inode to btrfs_ioctl_send() and _btrfs_ioctl_send()
as it's an internal interface, allowing to remove some use of BTRFS_I.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>

+7 -7
+3 -3
fs/btrfs/ioctl.c
··· 4473 4473 return ret; 4474 4474 } 4475 4475 4476 - static int _btrfs_ioctl_send(struct inode *inode, void __user *argp, bool compat) 4476 + static int _btrfs_ioctl_send(struct btrfs_inode *inode, void __user *argp, bool compat) 4477 4477 { 4478 4478 struct btrfs_ioctl_send_args *arg; 4479 4479 int ret; ··· 4795 4795 return btrfs_ioctl_set_received_subvol_32(file, argp); 4796 4796 #endif 4797 4797 case BTRFS_IOC_SEND: 4798 - return _btrfs_ioctl_send(inode, argp, false); 4798 + return _btrfs_ioctl_send(BTRFS_I(inode), argp, false); 4799 4799 #if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT) 4800 4800 case BTRFS_IOC_SEND_32: 4801 - return _btrfs_ioctl_send(inode, argp, true); 4801 + return _btrfs_ioctl_send(BTRFS_I(inode), argp, true); 4802 4802 #endif 4803 4803 case BTRFS_IOC_GET_DEV_STATS: 4804 4804 return btrfs_ioctl_get_dev_stats(fs_info, argp);
+2 -2
fs/btrfs/send.c
··· 8065 8065 btrfs_root_id(root), root->dedupe_in_progress); 8066 8066 } 8067 8067 8068 - long btrfs_ioctl_send(struct inode *inode, const struct btrfs_ioctl_send_args *arg) 8068 + long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_args *arg) 8069 8069 { 8070 8070 int ret = 0; 8071 - struct btrfs_root *send_root = BTRFS_I(inode)->root; 8071 + struct btrfs_root *send_root = inode->root; 8072 8072 struct btrfs_fs_info *fs_info = send_root->fs_info; 8073 8073 struct btrfs_root *clone_root; 8074 8074 struct send_ctx *sctx = NULL;
+2 -2
fs/btrfs/send.h
··· 11 11 #include <linux/sizes.h> 12 12 #include <linux/align.h> 13 13 14 - struct inode; 14 + struct btrfs_inode; 15 15 struct btrfs_ioctl_send_args; 16 16 17 17 #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream" ··· 182 182 __BTRFS_SEND_A_MAX = 35, 183 183 }; 184 184 185 - long btrfs_ioctl_send(struct inode *inode, const struct btrfs_ioctl_send_args *arg); 185 + long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_args *arg); 186 186 187 187 #endif