diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 23:16:07 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 23:16:07 -0500 |
| commit | d895cb1af15c04c522a25c79cc429076987c089b (patch) | |
| tree | 895dc9157e28f603d937a58be664e4e440d5530c /fs/btrfs | |
| parent | 9626357371b519f2b955fef399647181034a77fe (diff) | |
| parent | d3d009cb965eae7e002ea5badf603ea8f4c34915 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro:
"Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
locking violations, etc.
The most visible changes here are death of FS_REVAL_DOT (replaced with
"has ->d_weak_revalidate()") and a new helper getting from struct file
to inode. Some bits of preparation to xattr method interface changes.
Misc patches by various people sent this cycle *and* ocfs2 fixes from
several cycles ago that should've been upstream right then.
PS: the next vfs pile will be xattr stuff."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
saner proc_get_inode() calling conventions
proc: avoid extra pde_put() in proc_fill_super()
fs: change return values from -EACCES to -EPERM
fs/exec.c: make bprm_mm_init() static
ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
ocfs2: fix possible use-after-free with AIO
ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
target: writev() on single-element vector is pointless
export kernel_write(), convert open-coded instances
fs: encode_fh: return FILEID_INVALID if invalid fid_type
kill f_vfsmnt
vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
nfsd: handle vfs_getattr errors in acl protocol
switch vfs_getattr() to struct path
default SET_PERSONALITY() in linux/elf.h
ceph: prepopulate inodes only when request is aborted
d_hash_and_lookup(): export, switch open-coded instances
9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
9p: split dropping the acls from v9fs_set_create_acl()
...
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/export.c | 4 | ||||
| -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 |
5 files changed, 35 insertions, 35 deletions
diff --git a/fs/btrfs/export.c b/fs/btrfs/export.c index 614f34a899c2..81ee29eeb7ca 100644 --- a/fs/btrfs/export.c +++ b/fs/btrfs/export.c | |||
| @@ -22,10 +22,10 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len, | |||
| 22 | 22 | ||
| 23 | if (parent && (len < BTRFS_FID_SIZE_CONNECTABLE)) { | 23 | if (parent && (len < BTRFS_FID_SIZE_CONNECTABLE)) { |
| 24 | *max_len = BTRFS_FID_SIZE_CONNECTABLE; | 24 | *max_len = BTRFS_FID_SIZE_CONNECTABLE; |
| 25 | return 255; | 25 | return FILEID_INVALID; |
| 26 | } else if (len < BTRFS_FID_SIZE_NON_CONNECTABLE) { | 26 | } else if (len < BTRFS_FID_SIZE_NON_CONNECTABLE) { |
| 27 | *max_len = BTRFS_FID_SIZE_NON_CONNECTABLE; | 27 | *max_len = BTRFS_FID_SIZE_NON_CONNECTABLE; |
| 28 | return 255; | 28 | return FILEID_INVALID; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | len = BTRFS_FID_SIZE_NON_CONNECTABLE; | 31 | len = BTRFS_FID_SIZE_NON_CONNECTABLE; |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index aeb84469d2c4..4b241fe9d2fe 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
| @@ -1225,7 +1225,7 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file, | |||
| 1225 | struct extent_state *cached_state = NULL; | 1225 | struct extent_state *cached_state = NULL; |
| 1226 | int i; | 1226 | int i; |
| 1227 | unsigned long index = pos >> PAGE_CACHE_SHIFT; | 1227 | unsigned long index = pos >> PAGE_CACHE_SHIFT; |
| 1228 | struct inode *inode = fdentry(file)->d_inode; | 1228 | struct inode *inode = file_inode(file); |
| 1229 | gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); | 1229 | gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); |
| 1230 | int err = 0; | 1230 | int err = 0; |
| 1231 | int faili = 0; | 1231 | int faili = 0; |
| @@ -1312,7 +1312,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, | |||
| 1312 | struct iov_iter *i, | 1312 | struct iov_iter *i, |
| 1313 | loff_t pos) | 1313 | loff_t pos) |
| 1314 | { | 1314 | { |
| 1315 | struct inode *inode = fdentry(file)->d_inode; | 1315 | struct inode *inode = file_inode(file); |
| 1316 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1316 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 1317 | struct page **pages = NULL; | 1317 | struct page **pages = NULL; |
| 1318 | unsigned long first_index; | 1318 | unsigned long first_index; |
| @@ -1500,7 +1500,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, | |||
| 1500 | unsigned long nr_segs, loff_t pos) | 1500 | unsigned long nr_segs, loff_t pos) |
| 1501 | { | 1501 | { |
| 1502 | struct file *file = iocb->ki_filp; | 1502 | struct file *file = iocb->ki_filp; |
| 1503 | struct inode *inode = fdentry(file)->d_inode; | 1503 | struct inode *inode = file_inode(file); |
| 1504 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1504 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 1505 | loff_t *ppos = &iocb->ki_pos; | 1505 | loff_t *ppos = &iocb->ki_pos; |
| 1506 | u64 start_pos; | 1506 | u64 start_pos; |
| @@ -2102,7 +2102,7 @@ out: | |||
| 2102 | static long btrfs_fallocate(struct file *file, int mode, | 2102 | static long btrfs_fallocate(struct file *file, int mode, |
| 2103 | loff_t offset, loff_t len) | 2103 | loff_t offset, loff_t len) |
| 2104 | { | 2104 | { |
| 2105 | struct inode *inode = file->f_path.dentry->d_inode; | 2105 | struct inode *inode = file_inode(file); |
| 2106 | struct extent_state *cached_state = NULL; | 2106 | struct extent_state *cached_state = NULL; |
| 2107 | u64 cur_offset; | 2107 | u64 cur_offset; |
| 2108 | u64 last_byte; | 2108 | u64 last_byte; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cc93b23ca352..55c07b650378 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -4391,7 +4391,7 @@ unsigned char btrfs_filetype_table[] = { | |||
| 4391 | static int btrfs_real_readdir(struct file *filp, void *dirent, | 4391 | static int btrfs_real_readdir(struct file *filp, void *dirent, |
| 4392 | filldir_t filldir) | 4392 | filldir_t filldir) |
| 4393 | { | 4393 | { |
| 4394 | struct inode *inode = filp->f_dentry->d_inode; | 4394 | struct inode *inode = file_inode(filp); |
| 4395 | struct btrfs_root *root = BTRFS_I(inode)->root; | 4395 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 4396 | struct btrfs_item *item; | 4396 | struct btrfs_item *item; |
| 4397 | struct btrfs_dir_item *di; | 4397 | struct btrfs_dir_item *di; |
| @@ -6791,7 +6791,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset) | |||
| 6791 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | 6791 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
| 6792 | { | 6792 | { |
| 6793 | struct page *page = vmf->page; | 6793 | struct page *page = vmf->page; |
| 6794 | struct inode *inode = fdentry(vma->vm_file)->d_inode; | 6794 | struct inode *inode = file_inode(vma->vm_file); |
| 6795 | struct btrfs_root *root = BTRFS_I(inode)->root; | 6795 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 6796 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; | 6796 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; |
| 6797 | struct btrfs_ordered_extent *ordered; | 6797 | struct btrfs_ordered_extent *ordered; |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 338f2597bf7f..c3f09f71bedd 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 | } |
| @@ -1320,7 +1320,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, | |||
| 1320 | u64 new_size; | 1320 | u64 new_size; |
| 1321 | u64 old_size; | 1321 | u64 old_size; |
| 1322 | u64 devid = 1; | 1322 | u64 devid = 1; |
| 1323 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 1323 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 1324 | struct btrfs_ioctl_vol_args *vol_args; | 1324 | struct btrfs_ioctl_vol_args *vol_args; |
| 1325 | struct btrfs_trans_handle *trans; | 1325 | struct btrfs_trans_handle *trans; |
| 1326 | struct btrfs_device *device = NULL; | 1326 | struct btrfs_device *device = NULL; |
| @@ -1489,8 +1489,8 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, | |||
| 1489 | goto out_drop_write; | 1489 | goto out_drop_write; |
| 1490 | } | 1490 | } |
| 1491 | 1491 | ||
| 1492 | src_inode = src.file->f_path.dentry->d_inode; | 1492 | src_inode = file_inode(src.file); |
| 1493 | if (src_inode->i_sb != file->f_path.dentry->d_inode->i_sb) { | 1493 | if (src_inode->i_sb != file_inode(file)->i_sb) { |
| 1494 | printk(KERN_INFO "btrfs: Snapshot src from " | 1494 | printk(KERN_INFO "btrfs: Snapshot src from " |
| 1495 | "another FS\n"); | 1495 | "another FS\n"); |
| 1496 | ret = -EINVAL; | 1496 | ret = -EINVAL; |
| @@ -1582,7 +1582,7 @@ out: | |||
| 1582 | static noinline int btrfs_ioctl_subvol_getflags(struct file *file, | 1582 | static noinline int btrfs_ioctl_subvol_getflags(struct file *file, |
| 1583 | void __user *arg) | 1583 | void __user *arg) |
| 1584 | { | 1584 | { |
| 1585 | struct inode *inode = fdentry(file)->d_inode; | 1585 | struct inode *inode = file_inode(file); |
| 1586 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1586 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 1587 | int ret = 0; | 1587 | int ret = 0; |
| 1588 | u64 flags = 0; | 1588 | u64 flags = 0; |
| @@ -1604,7 +1604,7 @@ static noinline int btrfs_ioctl_subvol_getflags(struct file *file, | |||
| 1604 | static noinline int btrfs_ioctl_subvol_setflags(struct file *file, | 1604 | static noinline int btrfs_ioctl_subvol_setflags(struct file *file, |
| 1605 | void __user *arg) | 1605 | void __user *arg) |
| 1606 | { | 1606 | { |
| 1607 | struct inode *inode = fdentry(file)->d_inode; | 1607 | struct inode *inode = file_inode(file); |
| 1608 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1608 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 1609 | struct btrfs_trans_handle *trans; | 1609 | struct btrfs_trans_handle *trans; |
| 1610 | u64 root_flags; | 1610 | u64 root_flags; |
| @@ -1898,7 +1898,7 @@ static noinline int btrfs_ioctl_tree_search(struct file *file, | |||
| 1898 | if (IS_ERR(args)) | 1898 | if (IS_ERR(args)) |
| 1899 | return PTR_ERR(args); | 1899 | return PTR_ERR(args); |
| 1900 | 1900 | ||
| 1901 | inode = fdentry(file)->d_inode; | 1901 | inode = file_inode(file); |
| 1902 | ret = search_ioctl(inode, args); | 1902 | ret = search_ioctl(inode, args); |
| 1903 | if (ret == 0 && copy_to_user(argp, args, sizeof(*args))) | 1903 | if (ret == 0 && copy_to_user(argp, args, sizeof(*args))) |
| 1904 | ret = -EFAULT; | 1904 | ret = -EFAULT; |
| @@ -2008,7 +2008,7 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file, | |||
| 2008 | if (IS_ERR(args)) | 2008 | if (IS_ERR(args)) |
| 2009 | return PTR_ERR(args); | 2009 | return PTR_ERR(args); |
| 2010 | 2010 | ||
| 2011 | inode = fdentry(file)->d_inode; | 2011 | inode = file_inode(file); |
| 2012 | 2012 | ||
| 2013 | if (args->treeid == 0) | 2013 | if (args->treeid == 0) |
| 2014 | args->treeid = BTRFS_I(inode)->root->root_key.objectid; | 2014 | args->treeid = BTRFS_I(inode)->root->root_key.objectid; |
| @@ -2184,7 +2184,7 @@ out: | |||
| 2184 | 2184 | ||
| 2185 | static int btrfs_ioctl_defrag(struct file *file, void __user *argp) | 2185 | static int btrfs_ioctl_defrag(struct file *file, void __user *argp) |
| 2186 | { | 2186 | { |
| 2187 | struct inode *inode = fdentry(file)->d_inode; | 2187 | struct inode *inode = file_inode(file); |
| 2188 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2188 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 2189 | struct btrfs_ioctl_defrag_range_args *range; | 2189 | struct btrfs_ioctl_defrag_range_args *range; |
| 2190 | int ret; | 2190 | int ret; |
| @@ -2244,7 +2244,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) | |||
| 2244 | /* the rest are all set to zero by kzalloc */ | 2244 | /* the rest are all set to zero by kzalloc */ |
| 2245 | range->len = (u64)-1; | 2245 | range->len = (u64)-1; |
| 2246 | } | 2246 | } |
| 2247 | ret = btrfs_defrag_file(fdentry(file)->d_inode, file, | 2247 | ret = btrfs_defrag_file(file_inode(file), file, |
| 2248 | range, 0, 0); | 2248 | range, 0, 0); |
| 2249 | if (ret > 0) | 2249 | if (ret > 0) |
| 2250 | ret = 0; | 2250 | ret = 0; |
| @@ -2292,7 +2292,7 @@ out: | |||
| 2292 | 2292 | ||
| 2293 | static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg) | 2293 | static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg) |
| 2294 | { | 2294 | { |
| 2295 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 2295 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 2296 | struct btrfs_ioctl_vol_args *vol_args; | 2296 | struct btrfs_ioctl_vol_args *vol_args; |
| 2297 | int ret; | 2297 | int ret; |
| 2298 | 2298 | ||
| @@ -2415,7 +2415,7 @@ out: | |||
| 2415 | static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | 2415 | static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, |
| 2416 | u64 off, u64 olen, u64 destoff) | 2416 | u64 off, u64 olen, u64 destoff) |
| 2417 | { | 2417 | { |
| 2418 | struct inode *inode = fdentry(file)->d_inode; | 2418 | struct inode *inode = file_inode(file); |
| 2419 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2419 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 2420 | struct fd src_file; | 2420 | struct fd src_file; |
| 2421 | struct inode *src; | 2421 | struct inode *src; |
| @@ -2461,7 +2461,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
| 2461 | if (src_file.file->f_path.mnt != file->f_path.mnt) | 2461 | if (src_file.file->f_path.mnt != file->f_path.mnt) |
| 2462 | goto out_fput; | 2462 | goto out_fput; |
| 2463 | 2463 | ||
| 2464 | src = src_file.file->f_dentry->d_inode; | 2464 | src = file_inode(src_file.file); |
| 2465 | 2465 | ||
| 2466 | ret = -EINVAL; | 2466 | ret = -EINVAL; |
| 2467 | if (src == inode) | 2467 | if (src == inode) |
| @@ -2823,7 +2823,7 @@ static long btrfs_ioctl_clone_range(struct file *file, void __user *argp) | |||
| 2823 | */ | 2823 | */ |
| 2824 | static long btrfs_ioctl_trans_start(struct file *file) | 2824 | static long btrfs_ioctl_trans_start(struct file *file) |
| 2825 | { | 2825 | { |
| 2826 | struct inode *inode = fdentry(file)->d_inode; | 2826 | struct inode *inode = file_inode(file); |
| 2827 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2827 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 2828 | struct btrfs_trans_handle *trans; | 2828 | struct btrfs_trans_handle *trans; |
| 2829 | int ret; | 2829 | int ret; |
| @@ -2863,7 +2863,7 @@ out: | |||
| 2863 | 2863 | ||
| 2864 | static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) | 2864 | static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) |
| 2865 | { | 2865 | { |
| 2866 | struct inode *inode = fdentry(file)->d_inode; | 2866 | struct inode *inode = file_inode(file); |
| 2867 | struct btrfs_root *root = BTRFS_I(inode)->root; | 2867 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 2868 | struct btrfs_root *new_root; | 2868 | struct btrfs_root *new_root; |
| 2869 | struct btrfs_dir_item *di; | 2869 | struct btrfs_dir_item *di; |
| @@ -3087,7 +3087,7 @@ out: | |||
| 3087 | */ | 3087 | */ |
| 3088 | long btrfs_ioctl_trans_end(struct file *file) | 3088 | long btrfs_ioctl_trans_end(struct file *file) |
| 3089 | { | 3089 | { |
| 3090 | struct inode *inode = fdentry(file)->d_inode; | 3090 | struct inode *inode = file_inode(file); |
| 3091 | struct btrfs_root *root = BTRFS_I(inode)->root; | 3091 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 3092 | struct btrfs_trans_handle *trans; | 3092 | struct btrfs_trans_handle *trans; |
| 3093 | 3093 | ||
| @@ -3149,7 +3149,7 @@ static noinline long btrfs_ioctl_wait_sync(struct btrfs_root *root, | |||
| 3149 | 3149 | ||
| 3150 | static long btrfs_ioctl_scrub(struct file *file, void __user *arg) | 3150 | static long btrfs_ioctl_scrub(struct file *file, void __user *arg) |
| 3151 | { | 3151 | { |
| 3152 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3152 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3153 | struct btrfs_ioctl_scrub_args *sa; | 3153 | struct btrfs_ioctl_scrub_args *sa; |
| 3154 | int ret; | 3154 | int ret; |
| 3155 | 3155 | ||
| @@ -3440,7 +3440,7 @@ void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock, | |||
| 3440 | 3440 | ||
| 3441 | static long btrfs_ioctl_balance(struct file *file, void __user *arg) | 3441 | static long btrfs_ioctl_balance(struct file *file, void __user *arg) |
| 3442 | { | 3442 | { |
| 3443 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3443 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3444 | struct btrfs_fs_info *fs_info = root->fs_info; | 3444 | struct btrfs_fs_info *fs_info = root->fs_info; |
| 3445 | struct btrfs_ioctl_balance_args *bargs; | 3445 | struct btrfs_ioctl_balance_args *bargs; |
| 3446 | struct btrfs_balance_control *bctl; | 3446 | struct btrfs_balance_control *bctl; |
| @@ -3630,7 +3630,7 @@ out: | |||
| 3630 | 3630 | ||
| 3631 | static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) | 3631 | static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) |
| 3632 | { | 3632 | { |
| 3633 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3633 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3634 | struct btrfs_ioctl_quota_ctl_args *sa; | 3634 | struct btrfs_ioctl_quota_ctl_args *sa; |
| 3635 | struct btrfs_trans_handle *trans = NULL; | 3635 | struct btrfs_trans_handle *trans = NULL; |
| 3636 | int ret; | 3636 | int ret; |
| @@ -3689,7 +3689,7 @@ drop_write: | |||
| 3689 | 3689 | ||
| 3690 | static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) | 3690 | static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) |
| 3691 | { | 3691 | { |
| 3692 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3692 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3693 | struct btrfs_ioctl_qgroup_assign_args *sa; | 3693 | struct btrfs_ioctl_qgroup_assign_args *sa; |
| 3694 | struct btrfs_trans_handle *trans; | 3694 | struct btrfs_trans_handle *trans; |
| 3695 | int ret; | 3695 | int ret; |
| @@ -3736,7 +3736,7 @@ drop_write: | |||
| 3736 | 3736 | ||
| 3737 | static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) | 3737 | static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) |
| 3738 | { | 3738 | { |
| 3739 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3739 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3740 | struct btrfs_ioctl_qgroup_create_args *sa; | 3740 | struct btrfs_ioctl_qgroup_create_args *sa; |
| 3741 | struct btrfs_trans_handle *trans; | 3741 | struct btrfs_trans_handle *trans; |
| 3742 | int ret; | 3742 | int ret; |
| @@ -3787,7 +3787,7 @@ drop_write: | |||
| 3787 | 3787 | ||
| 3788 | static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg) | 3788 | static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg) |
| 3789 | { | 3789 | { |
| 3790 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3790 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3791 | struct btrfs_ioctl_qgroup_limit_args *sa; | 3791 | struct btrfs_ioctl_qgroup_limit_args *sa; |
| 3792 | struct btrfs_trans_handle *trans; | 3792 | struct btrfs_trans_handle *trans; |
| 3793 | int ret; | 3793 | int ret; |
| @@ -3837,7 +3837,7 @@ static long btrfs_ioctl_set_received_subvol(struct file *file, | |||
| 3837 | void __user *arg) | 3837 | void __user *arg) |
| 3838 | { | 3838 | { |
| 3839 | struct btrfs_ioctl_received_subvol_args *sa = NULL; | 3839 | struct btrfs_ioctl_received_subvol_args *sa = NULL; |
| 3840 | struct inode *inode = fdentry(file)->d_inode; | 3840 | struct inode *inode = file_inode(file); |
| 3841 | struct btrfs_root *root = BTRFS_I(inode)->root; | 3841 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 3842 | struct btrfs_root_item *root_item = &root->root_item; | 3842 | struct btrfs_root_item *root_item = &root->root_item; |
| 3843 | struct btrfs_trans_handle *trans; | 3843 | struct btrfs_trans_handle *trans; |
| @@ -3917,7 +3917,7 @@ out: | |||
| 3917 | long btrfs_ioctl(struct file *file, unsigned int | 3917 | long btrfs_ioctl(struct file *file, unsigned int |
| 3918 | cmd, unsigned long arg) | 3918 | cmd, unsigned long arg) |
| 3919 | { | 3919 | { |
| 3920 | struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; | 3920 | struct btrfs_root *root = BTRFS_I(file_inode(file))->root; |
| 3921 | void __user *argp = (void __user *)arg; | 3921 | void __user *argp = (void __user *)arg; |
| 3922 | 3922 | ||
| 3923 | switch (cmd) { | 3923 | switch (cmd) { |
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 321b7fb4e441..f4ab7a9260eb 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
| @@ -4544,7 +4544,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_) | |||
| 4544 | if (!capable(CAP_SYS_ADMIN)) | 4544 | if (!capable(CAP_SYS_ADMIN)) |
| 4545 | return -EPERM; | 4545 | return -EPERM; |
| 4546 | 4546 | ||
| 4547 | send_root = BTRFS_I(fdentry(mnt_file)->d_inode)->root; | 4547 | send_root = BTRFS_I(file_inode(mnt_file))->root; |
| 4548 | fs_info = send_root->fs_info; | 4548 | fs_info = send_root->fs_info; |
| 4549 | 4549 | ||
| 4550 | arg = memdup_user(arg_, sizeof(*arg)); | 4550 | arg = memdup_user(arg_, sizeof(*arg)); |
