diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 8 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 4 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 52 | ||||
-rw-r--r-- | fs/btrfs/send.c | 2 |
4 files changed, 33 insertions, 33 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 77061bf43edb..4118e0b6e339 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1211,7 +1211,7 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file, | |||
1211 | struct extent_state *cached_state = NULL; | 1211 | struct extent_state *cached_state = NULL; |
1212 | int i; | 1212 | int i; |
1213 | unsigned long index = pos >> PAGE_CACHE_SHIFT; | 1213 | unsigned long index = pos >> PAGE_CACHE_SHIFT; |
1214 | struct inode *inode = fdentry(file)->d_inode; | 1214 | struct inode *inode = file_inode(file); |
1215 | gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); | 1215 | gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); |
1216 | int err = 0; | 1216 | int err = 0; |
1217 | int faili = 0; | 1217 | int faili = 0; |
@@ -1298,7 +1298,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, | |||
1298 | struct iov_iter *i, | 1298 | struct iov_iter *i, |
1299 | loff_t pos) | 1299 | loff_t pos) |
1300 | { | 1300 | { |
1301 | struct inode *inode = fdentry(file)->d_inode; | 1301 | struct inode *inode = file_inode(file); |
1302 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1302 | struct btrfs_root *root = BTRFS_I(inode)->root; |
1303 | struct page **pages = NULL; | 1303 | struct page **pages = NULL; |
1304 | unsigned long first_index; | 1304 | unsigned long first_index; |
@@ -1486,7 +1486,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, | |||
1486 | unsigned long nr_segs, loff_t pos) | 1486 | unsigned long nr_segs, loff_t pos) |
1487 | { | 1487 | { |
1488 | struct file *file = iocb->ki_filp; | 1488 | struct file *file = iocb->ki_filp; |
1489 | struct inode *inode = fdentry(file)->d_inode; | 1489 | struct inode *inode = file_inode(file); |
1490 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1490 | struct btrfs_root *root = BTRFS_I(inode)->root; |
1491 | loff_t *ppos = &iocb->ki_pos; | 1491 | loff_t *ppos = &iocb->ki_pos; |
1492 | u64 start_pos; | 1492 | u64 start_pos; |
@@ -2087,7 +2087,7 @@ out: | |||
2087 | static long btrfs_fallocate(struct file *file, int mode, | 2087 | static long btrfs_fallocate(struct file *file, int mode, |
2088 | loff_t offset, loff_t len) | 2088 | loff_t offset, loff_t len) |
2089 | { | 2089 | { |
2090 | struct inode *inode = file->f_path.dentry->d_inode; | 2090 | struct inode *inode = file_inode(file); |
2091 | struct extent_state *cached_state = NULL; | 2091 | struct extent_state *cached_state = NULL; |
2092 | u64 cur_offset; | 2092 | u64 cur_offset; |
2093 | u64 last_byte; | 2093 | u64 last_byte; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 16d9e8e191e6..02d946a61ddd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -4342,7 +4342,7 @@ unsigned char btrfs_filetype_table[] = { | |||
4342 | static int btrfs_real_readdir(struct file *filp, void *dirent, | 4342 | static int btrfs_real_readdir(struct file *filp, void *dirent, |
4343 | filldir_t filldir) | 4343 | filldir_t filldir) |
4344 | { | 4344 | { |
4345 | struct inode *inode = filp->f_dentry->d_inode; | 4345 | struct inode *inode = file_inode(filp); |
4346 | struct btrfs_root *root = BTRFS_I(inode)->root; | 4346 | struct btrfs_root *root = BTRFS_I(inode)->root; |
4347 | struct btrfs_item *item; | 4347 | struct btrfs_item *item; |
4348 | struct btrfs_dir_item *di; | 4348 | struct btrfs_dir_item *di; |
@@ -6737,7 +6737,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset) | |||
6737 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | 6737 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
6738 | { | 6738 | { |
6739 | struct page *page = vmf->page; | 6739 | struct page *page = vmf->page; |
6740 | struct inode *inode = fdentry(vma->vm_file)->d_inode; | 6740 | struct inode *inode = file_inode(vma->vm_file); |
6741 | struct btrfs_root *root = BTRFS_I(inode)->root; | 6741 | struct btrfs_root *root = BTRFS_I(inode)->root; |
6742 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; | 6742 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; |
6743 | struct btrfs_ordered_extent *ordered; | 6743 | struct btrfs_ordered_extent *ordered; |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 4b4516770f05..61045adc3075 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -152,7 +152,7 @@ void btrfs_inherit_iflags(struct inode *inode, struct inode *dir) | |||
152 | 152 | ||
153 | static int btrfs_ioctl_getflags(struct file *file, void __user *arg) | 153 | static int btrfs_ioctl_getflags(struct file *file, void __user *arg) |
154 | { | 154 | { |
155 | struct btrfs_inode *ip = BTRFS_I(file->f_path.dentry->d_inode); | 155 | struct btrfs_inode *ip = BTRFS_I(file_inode(file)); |
156 | unsigned int flags = btrfs_flags_to_ioctl(ip->flags); | 156 | unsigned int flags = btrfs_flags_to_ioctl(ip->flags); |
157 | 157 | ||
158 | if (copy_to_user(arg, &flags, sizeof(flags))) | 158 | if (copy_to_user(arg, &flags, sizeof(flags))) |
@@ -177,7 +177,7 @@ static int check_flags(unsigned int flags) | |||
177 | 177 | ||
178 | static int btrfs_ioctl_setflags(struct file *file, void __user *arg) | 178 | static int btrfs_ioctl_setflags(struct file *file, void __user *arg) |
179 | { | 179 | { |
180 | struct inode *inode = file->f_path.dentry->d_inode; | 180 | struct inode *inode = file_inode(file); |
181 | struct btrfs_inode *ip = BTRFS_I(inode); | 181 | struct btrfs_inode *ip = BTRFS_I(inode); |
182 | struct btrfs_root *root = ip->root; | 182 | struct btrfs_root *root = ip->root; |
183 | struct btrfs_trans_handle *trans; | 183 | struct btrfs_trans_handle *trans; |
@@ -310,7 +310,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) | |||
310 | 310 | ||
311 | static int btrfs_ioctl_getversion(struct file *file, int __user *arg) | 311 | static int btrfs_ioctl_getversion(struct file *file, int __user *arg) |
312 | { | 312 | { |
313 | struct inode *inode = file->f_path.dentry->d_inode; | 313 | struct inode *inode = file_inode(file); |
314 | 314 | ||
315 | return put_user(inode->i_generation, arg); | 315 | return put_user(inode->i_generation, arg); |
316 | } | 316 | } |
@@ -1317,7 +1317,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, | |||
1317 | u64 new_size; | 1317 | u64 new_size; |
1318 | u64 old_size; | 1318 | u64 old_size; |
1319 | u64 devid = 1; | 1319 | u64 devid = 1; |
1320 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 1320 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
1321 | struct btrfs_ioctl_vol_args *vol_args; | 1321 | struct btrfs_ioctl_vol_args *vol_args; |
1322 | struct btrfs_trans_handle *trans; | 1322 | struct btrfs_trans_handle *trans; |
1323 | struct btrfs_device *device = NULL; | 1323 | struct btrfs_device *device = NULL; |
@@ -1483,8 +1483,8 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, | |||
1483 | goto out_drop_write; | 1483 | goto out_drop_write; |
1484 | } | 1484 | } |
1485 | 1485 | ||
1486 | src_inode = src.file->f_path.dentry->d_inode; | 1486 | src_inode = file_inode(src.file); |
1487 | if (src_inode->i_sb != file->f_path.dentry->d_inode->i_sb) { | 1487 | if (src_inode->i_sb != file_inode(file)->i_sb) { |
1488 | printk(KERN_INFO "btrfs: Snapshot src from " | 1488 | printk(KERN_INFO "btrfs: Snapshot src from " |
1489 | "another FS\n"); | 1489 | "another FS\n"); |
1490 | ret = -EINVAL; | 1490 | ret = -EINVAL; |
@@ -1576,7 +1576,7 @@ out: | |||
1576 | static noinline int btrfs_ioctl_subvol_getflags(struct file *file, | 1576 | static noinline int btrfs_ioctl_subvol_getflags(struct file *file, |
1577 | void __user *arg) | 1577 | void __user *arg) |
1578 | { | 1578 | { |
1579 | struct inode *inode = fdentry(file)->d_inode; | 1579 | struct inode *inode = file_inode(file); |
1580 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1580 | struct btrfs_root *root = BTRFS_I(inode)->root; |
1581 | int ret = 0; | 1581 | int ret = 0; |
1582 | u64 flags = 0; | 1582 | u64 flags = 0; |
@@ -1598,7 +1598,7 @@ static noinline int btrfs_ioctl_subvol_getflags(struct file *file, | |||
1598 | static noinline int btrfs_ioctl_subvol_setflags(struct file *file, | 1598 | static noinline int btrfs_ioctl_subvol_setflags(struct file *file, |
1599 | void __user *arg) | 1599 | void __user *arg) |
1600 | { | 1600 | { |
1601 | struct inode *inode = fdentry(file)->d_inode; | 1601 | struct inode *inode = file_inode(file); |
1602 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1602 | struct btrfs_root *root = BTRFS_I(inode)->root; |
1603 | struct btrfs_trans_handle *trans; | 1603 | struct btrfs_trans_handle *trans; |
1604 | u64 root_flags; | 1604 | u64 root_flags; |
@@ -1892,7 +1892,7 @@ static noinline int btrfs_ioctl_tree_search(struct file *file, | |||
1892 | if (IS_ERR(args)) | 1892 | if (IS_ERR(args)) |
1893 | return PTR_ERR(args); | 1893 | return PTR_ERR(args); |
1894 | 1894 | ||
1895 | inode = fdentry(file)->d_inode; | 1895 | inode = file_inode(file); |
1896 | ret = search_ioctl(inode, args); | 1896 | ret = search_ioctl(inode, args); |
1897 | if (ret == 0 && copy_to_user(argp, args, sizeof(*args))) | 1897 | if (ret == 0 && copy_to_user(argp, args, sizeof(*args))) |
1898 | ret = -EFAULT; | 1898 | ret = -EFAULT; |
@@ -2002,7 +2002,7 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file, | |||
2002 | if (IS_ERR(args)) | 2002 | if (IS_ERR(args)) |
2003 | return PTR_ERR(args); | 2003 | return PTR_ERR(args); |
2004 | 2004 | ||
2005 | inode = fdentry(file)->d_inode; | 2005 | inode = file_inode(file); |
2006 | 2006 | ||
2007 | if (args->treeid == 0) | 2007 | if (args->treeid == 0) |
2008 | args->treeid = BTRFS_I(inode)->root->root_key.objectid; | 2008 | args->treeid = BTRFS_I(inode)->root->root_key.objectid; |
@@ -2178,7 +2178,7 @@ out: | |||
2178 | 2178 | ||
2179 | static int btrfs_ioctl_defrag(struct file *file, void __user *argp) | 2179 | static int btrfs_ioctl_defrag(struct file *file, void __user *argp) |
2180 | { | 2180 | { |
2181 | struct inode *inode = fdentry(file)->d_inode; | 2181 | struct inode *inode = file_inode(file); |
2182 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2182 | struct btrfs_root *root = BTRFS_I(inode)->root; |
2183 | struct btrfs_ioctl_defrag_range_args *range; | 2183 | struct btrfs_ioctl_defrag_range_args *range; |
2184 | int ret; | 2184 | int ret; |
@@ -2237,7 +2237,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) | |||
2237 | /* the rest are all set to zero by kzalloc */ | 2237 | /* the rest are all set to zero by kzalloc */ |
2238 | range->len = (u64)-1; | 2238 | range->len = (u64)-1; |
2239 | } | 2239 | } |
2240 | ret = btrfs_defrag_file(fdentry(file)->d_inode, file, | 2240 | ret = btrfs_defrag_file(file_inode(file), file, |
2241 | range, 0, 0); | 2241 | range, 0, 0); |
2242 | if (ret > 0) | 2242 | if (ret > 0) |
2243 | ret = 0; | 2243 | ret = 0; |
@@ -2285,7 +2285,7 @@ out: | |||
2285 | 2285 | ||
2286 | static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg) | 2286 | static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg) |
2287 | { | 2287 | { |
2288 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 2288 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
2289 | struct btrfs_ioctl_vol_args *vol_args; | 2289 | struct btrfs_ioctl_vol_args *vol_args; |
2290 | int ret; | 2290 | int ret; |
2291 | 2291 | ||
@@ -2408,7 +2408,7 @@ out: | |||
2408 | static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | 2408 | static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, |
2409 | u64 off, u64 olen, u64 destoff) | 2409 | u64 off, u64 olen, u64 destoff) |
2410 | { | 2410 | { |
2411 | struct inode *inode = fdentry(file)->d_inode; | 2411 | struct inode *inode = file_inode(file); |
2412 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2412 | struct btrfs_root *root = BTRFS_I(inode)->root; |
2413 | struct fd src_file; | 2413 | struct fd src_file; |
2414 | struct inode *src; | 2414 | struct inode *src; |
@@ -2454,7 +2454,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
2454 | if (src_file.file->f_path.mnt != file->f_path.mnt) | 2454 | if (src_file.file->f_path.mnt != file->f_path.mnt) |
2455 | goto out_fput; | 2455 | goto out_fput; |
2456 | 2456 | ||
2457 | src = src_file.file->f_dentry->d_inode; | 2457 | src = file_inode(src_file.file); |
2458 | 2458 | ||
2459 | ret = -EINVAL; | 2459 | ret = -EINVAL; |
2460 | if (src == inode) | 2460 | if (src == inode) |
@@ -2816,7 +2816,7 @@ static long btrfs_ioctl_clone_range(struct file *file, void __user *argp) | |||
2816 | */ | 2816 | */ |
2817 | static long btrfs_ioctl_trans_start(struct file *file) | 2817 | static long btrfs_ioctl_trans_start(struct file *file) |
2818 | { | 2818 | { |
2819 | struct inode *inode = fdentry(file)->d_inode; | 2819 | struct inode *inode = file_inode(file); |
2820 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2820 | struct btrfs_root *root = BTRFS_I(inode)->root; |
2821 | struct btrfs_trans_handle *trans; | 2821 | struct btrfs_trans_handle *trans; |
2822 | int ret; | 2822 | int ret; |
@@ -2856,7 +2856,7 @@ out: | |||
2856 | 2856 | ||
2857 | static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) | 2857 | static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) |
2858 | { | 2858 | { |
2859 | struct inode *inode = fdentry(file)->d_inode; | 2859 | struct inode *inode = file_inode(file); |
2860 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2860 | struct btrfs_root *root = BTRFS_I(inode)->root; |
2861 | struct btrfs_root *new_root; | 2861 | struct btrfs_root *new_root; |
2862 | struct btrfs_dir_item *di; | 2862 | struct btrfs_dir_item *di; |
@@ -3080,7 +3080,7 @@ out: | |||
3080 | */ | 3080 | */ |
3081 | long btrfs_ioctl_trans_end(struct file *file) | 3081 | long btrfs_ioctl_trans_end(struct file *file) |
3082 | { | 3082 | { |
3083 | struct inode *inode = fdentry(file)->d_inode; | 3083 | struct inode *inode = file_inode(file); |
3084 | struct btrfs_root *root = BTRFS_I(inode)->root; | 3084 | struct btrfs_root *root = BTRFS_I(inode)->root; |
3085 | struct btrfs_trans_handle *trans; | 3085 | struct btrfs_trans_handle *trans; |
3086 | 3086 | ||
@@ -3142,7 +3142,7 @@ static noinline long btrfs_ioctl_wait_sync(struct btrfs_root *root, | |||
3142 | 3142 | ||
3143 | static long btrfs_ioctl_scrub(struct file *file, void __user *arg) | 3143 | static long btrfs_ioctl_scrub(struct file *file, void __user *arg) |
3144 | { | 3144 | { |
3145 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3145 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3146 | struct btrfs_ioctl_scrub_args *sa; | 3146 | struct btrfs_ioctl_scrub_args *sa; |
3147 | int ret; | 3147 | int ret; |
3148 | 3148 | ||
@@ -3433,7 +3433,7 @@ void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock, | |||
3433 | 3433 | ||
3434 | static long btrfs_ioctl_balance(struct file *file, void __user *arg) | 3434 | static long btrfs_ioctl_balance(struct file *file, void __user *arg) |
3435 | { | 3435 | { |
3436 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3436 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3437 | struct btrfs_fs_info *fs_info = root->fs_info; | 3437 | struct btrfs_fs_info *fs_info = root->fs_info; |
3438 | struct btrfs_ioctl_balance_args *bargs; | 3438 | struct btrfs_ioctl_balance_args *bargs; |
3439 | struct btrfs_balance_control *bctl; | 3439 | struct btrfs_balance_control *bctl; |
@@ -3573,7 +3573,7 @@ out: | |||
3573 | 3573 | ||
3574 | static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) | 3574 | static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) |
3575 | { | 3575 | { |
3576 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3576 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3577 | struct btrfs_ioctl_quota_ctl_args *sa; | 3577 | struct btrfs_ioctl_quota_ctl_args *sa; |
3578 | struct btrfs_trans_handle *trans = NULL; | 3578 | struct btrfs_trans_handle *trans = NULL; |
3579 | int ret; | 3579 | int ret; |
@@ -3632,7 +3632,7 @@ drop_write: | |||
3632 | 3632 | ||
3633 | static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) | 3633 | static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) |
3634 | { | 3634 | { |
3635 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3635 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3636 | struct btrfs_ioctl_qgroup_assign_args *sa; | 3636 | struct btrfs_ioctl_qgroup_assign_args *sa; |
3637 | struct btrfs_trans_handle *trans; | 3637 | struct btrfs_trans_handle *trans; |
3638 | int ret; | 3638 | int ret; |
@@ -3679,7 +3679,7 @@ drop_write: | |||
3679 | 3679 | ||
3680 | static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) | 3680 | static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) |
3681 | { | 3681 | { |
3682 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3682 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3683 | struct btrfs_ioctl_qgroup_create_args *sa; | 3683 | struct btrfs_ioctl_qgroup_create_args *sa; |
3684 | struct btrfs_trans_handle *trans; | 3684 | struct btrfs_trans_handle *trans; |
3685 | int ret; | 3685 | int ret; |
@@ -3725,7 +3725,7 @@ drop_write: | |||
3725 | 3725 | ||
3726 | static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg) | 3726 | static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg) |
3727 | { | 3727 | { |
3728 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3728 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3729 | struct btrfs_ioctl_qgroup_limit_args *sa; | 3729 | struct btrfs_ioctl_qgroup_limit_args *sa; |
3730 | struct btrfs_trans_handle *trans; | 3730 | struct btrfs_trans_handle *trans; |
3731 | int ret; | 3731 | int ret; |
@@ -3775,7 +3775,7 @@ static long btrfs_ioctl_set_received_subvol(struct file *file, | |||
3775 | void __user *arg) | 3775 | void __user *arg) |
3776 | { | 3776 | { |
3777 | struct btrfs_ioctl_received_subvol_args *sa = NULL; | 3777 | struct btrfs_ioctl_received_subvol_args *sa = NULL; |
3778 | struct inode *inode = fdentry(file)->d_inode; | 3778 | struct inode *inode = file_inode(file); |
3779 | struct btrfs_root *root = BTRFS_I(inode)->root; | 3779 | struct btrfs_root *root = BTRFS_I(inode)->root; |
3780 | struct btrfs_root_item *root_item = &root->root_item; | 3780 | struct btrfs_root_item *root_item = &root->root_item; |
3781 | struct btrfs_trans_handle *trans; | 3781 | struct btrfs_trans_handle *trans; |
@@ -3855,7 +3855,7 @@ out: | |||
3855 | long btrfs_ioctl(struct file *file, unsigned int | 3855 | long btrfs_ioctl(struct file *file, unsigned int |
3856 | cmd, unsigned long arg) | 3856 | cmd, unsigned long arg) |
3857 | { | 3857 | { |
3858 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3858 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
3859 | void __user *argp = (void __user *)arg; | 3859 | void __user *argp = (void __user *)arg; |
3860 | 3860 | ||
3861 | switch (cmd) { | 3861 | switch (cmd) { |
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 54454542ad40..f80df6b04648 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
@@ -4542,7 +4542,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_) | |||
4542 | if (!capable(CAP_SYS_ADMIN)) | 4542 | if (!capable(CAP_SYS_ADMIN)) |
4543 | return -EPERM; | 4543 | return -EPERM; |
4544 | 4544 | ||
4545 | send_root = BTRFS_I(fdentry(mnt_file)->d_inode)->root; | 4545 | send_root = BTRFS_I(file_inode(mnt_file))->root; |
4546 | fs_info = send_root->fs_info; | 4546 | fs_info = send_root->fs_info; |
4547 | 4547 | ||
4548 | arg = memdup_user(arg_, sizeof(*arg)); | 4548 | arg = memdup_user(arg_, sizeof(*arg)); |