aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-01-16 15:26:31 -0500
committerChris Mason <chris.mason@oracle.com>2012-01-16 15:26:31 -0500
commit9785dbdf265ddc47d5c88267d89a97648c0dc14b (patch)
tree3a97a48d6f282f9e06c5446beeb886fcd86c4798 /fs/btrfs/ioctl.c
parentd756bd2d9339447c29bde950910586df8f8941ec (diff)
parent6bf7e080d5bcb0d399ee38ce3dabbfad64448192 (diff)
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into integration
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ef909b5d3d2e..7fdf22c2dc0d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -368,7 +368,7 @@ static noinline int create_subvol(struct btrfs_root *root,
368 return PTR_ERR(trans); 368 return PTR_ERR(trans);
369 369
370 leaf = btrfs_alloc_free_block(trans, root, root->leafsize, 370 leaf = btrfs_alloc_free_block(trans, root, root->leafsize,
371 0, objectid, NULL, 0, 0, 0); 371 0, objectid, NULL, 0, 0, 0, 0);
372 if (IS_ERR(leaf)) { 372 if (IS_ERR(leaf)) {
373 ret = PTR_ERR(leaf); 373 ret = PTR_ERR(leaf);
374 goto fail; 374 goto fail;
@@ -2468,7 +2468,8 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
2468 disko, diskl, 0, 2468 disko, diskl, 0,
2469 root->root_key.objectid, 2469 root->root_key.objectid,
2470 btrfs_ino(inode), 2470 btrfs_ino(inode),
2471 new_key.offset - datao); 2471 new_key.offset - datao,
2472 0);
2472 BUG_ON(ret); 2473 BUG_ON(ret);
2473 } 2474 }
2474 } else if (type == BTRFS_FILE_EXTENT_INLINE) { 2475 } else if (type == BTRFS_FILE_EXTENT_INLINE) {
@@ -3018,7 +3019,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3018{ 3019{
3019 int ret = 0; 3020 int ret = 0;
3020 int size; 3021 int size;
3021 u64 extent_offset; 3022 u64 extent_item_pos;
3022 struct btrfs_ioctl_logical_ino_args *loi; 3023 struct btrfs_ioctl_logical_ino_args *loi;
3023 struct btrfs_data_container *inodes = NULL; 3024 struct btrfs_data_container *inodes = NULL;
3024 struct btrfs_path *path = NULL; 3025 struct btrfs_path *path = NULL;
@@ -3049,15 +3050,17 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3049 } 3050 }
3050 3051
3051 ret = extent_from_logical(root->fs_info, loi->logical, path, &key); 3052 ret = extent_from_logical(root->fs_info, loi->logical, path, &key);
3053 btrfs_release_path(path);
3052 3054
3053 if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK) 3055 if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK)
3054 ret = -ENOENT; 3056 ret = -ENOENT;
3055 if (ret < 0) 3057 if (ret < 0)
3056 goto out; 3058 goto out;
3057 3059
3058 extent_offset = loi->logical - key.objectid; 3060 extent_item_pos = loi->logical - key.objectid;
3059 ret = iterate_extent_inodes(root->fs_info, path, key.objectid, 3061 ret = iterate_extent_inodes(root->fs_info, path, key.objectid,
3060 extent_offset, build_ino_list, inodes); 3062 extent_item_pos, build_ino_list,
3063 inodes);
3061 3064
3062 if (ret < 0) 3065 if (ret < 0)
3063 goto out; 3066 goto out;