diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 26f4d56cf049..2840989737b7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1164,7 +1164,7 @@ out_check: | |||
1164 | goto next_slot; | 1164 | goto next_slot; |
1165 | } | 1165 | } |
1166 | 1166 | ||
1167 | btrfs_release_path(root, path); | 1167 | btrfs_release_path(path); |
1168 | if (cow_start != (u64)-1) { | 1168 | if (cow_start != (u64)-1) { |
1169 | ret = cow_file_range(inode, locked_page, cow_start, | 1169 | ret = cow_file_range(inode, locked_page, cow_start, |
1170 | found_key.offset - 1, page_started, | 1170 | found_key.offset - 1, page_started, |
@@ -1222,7 +1222,7 @@ out_check: | |||
1222 | if (cur_offset > end) | 1222 | if (cur_offset > end) |
1223 | break; | 1223 | break; |
1224 | } | 1224 | } |
1225 | btrfs_release_path(root, path); | 1225 | btrfs_release_path(path); |
1226 | 1226 | ||
1227 | if (cur_offset <= end && cow_start == (u64)-1) | 1227 | if (cur_offset <= end && cow_start == (u64)-1) |
1228 | cow_start = cur_offset; | 1228 | cow_start = cur_offset; |
@@ -2346,7 +2346,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) | |||
2346 | break; | 2346 | break; |
2347 | 2347 | ||
2348 | /* release the path since we're done with it */ | 2348 | /* release the path since we're done with it */ |
2349 | btrfs_release_path(root, path); | 2349 | btrfs_release_path(path); |
2350 | 2350 | ||
2351 | /* | 2351 | /* |
2352 | * this is where we are basically btrfs_lookup, without the | 2352 | * this is where we are basically btrfs_lookup, without the |
@@ -2712,7 +2712,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, | |||
2712 | ret = btrfs_delete_one_dir_name(trans, root, path, di); | 2712 | ret = btrfs_delete_one_dir_name(trans, root, path, di); |
2713 | if (ret) | 2713 | if (ret) |
2714 | goto err; | 2714 | goto err; |
2715 | btrfs_release_path(root, path); | 2715 | btrfs_release_path(path); |
2716 | 2716 | ||
2717 | ret = btrfs_del_inode_ref(trans, root, name, name_len, | 2717 | ret = btrfs_del_inode_ref(trans, root, name, name_len, |
2718 | inode->i_ino, | 2718 | inode->i_ino, |
@@ -2735,7 +2735,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, | |||
2735 | goto err; | 2735 | goto err; |
2736 | } | 2736 | } |
2737 | ret = btrfs_delete_one_dir_name(trans, root, path, di); | 2737 | ret = btrfs_delete_one_dir_name(trans, root, path, di); |
2738 | btrfs_release_path(root, path); | 2738 | btrfs_release_path(path); |
2739 | 2739 | ||
2740 | ret = btrfs_del_inode_ref_in_log(trans, root, name, name_len, | 2740 | ret = btrfs_del_inode_ref_in_log(trans, root, name, name_len, |
2741 | inode, dir->i_ino); | 2741 | inode, dir->i_ino); |
@@ -2862,7 +2862,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, | |||
2862 | } else { | 2862 | } else { |
2863 | check_link = 0; | 2863 | check_link = 0; |
2864 | } | 2864 | } |
2865 | btrfs_release_path(root, path); | 2865 | btrfs_release_path(path); |
2866 | 2866 | ||
2867 | ret = btrfs_lookup_inode(trans, root, path, | 2867 | ret = btrfs_lookup_inode(trans, root, path, |
2868 | &BTRFS_I(inode)->location, 0); | 2868 | &BTRFS_I(inode)->location, 0); |
@@ -2876,7 +2876,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, | |||
2876 | } else { | 2876 | } else { |
2877 | check_link = 0; | 2877 | check_link = 0; |
2878 | } | 2878 | } |
2879 | btrfs_release_path(root, path); | 2879 | btrfs_release_path(path); |
2880 | 2880 | ||
2881 | if (ret == 0 && S_ISREG(inode->i_mode)) { | 2881 | if (ret == 0 && S_ISREG(inode->i_mode)) { |
2882 | ret = btrfs_lookup_file_extent(trans, root, path, | 2882 | ret = btrfs_lookup_file_extent(trans, root, path, |
@@ -2888,7 +2888,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, | |||
2888 | BUG_ON(ret == 0); | 2888 | BUG_ON(ret == 0); |
2889 | if (check_path_shared(root, path)) | 2889 | if (check_path_shared(root, path)) |
2890 | goto out; | 2890 | goto out; |
2891 | btrfs_release_path(root, path); | 2891 | btrfs_release_path(path); |
2892 | } | 2892 | } |
2893 | 2893 | ||
2894 | if (!check_link) { | 2894 | if (!check_link) { |
@@ -2909,7 +2909,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, | |||
2909 | err = 0; | 2909 | err = 0; |
2910 | goto out; | 2910 | goto out; |
2911 | } | 2911 | } |
2912 | btrfs_release_path(root, path); | 2912 | btrfs_release_path(path); |
2913 | 2913 | ||
2914 | ref = btrfs_lookup_inode_ref(trans, root, path, | 2914 | ref = btrfs_lookup_inode_ref(trans, root, path, |
2915 | dentry->d_name.name, dentry->d_name.len, | 2915 | dentry->d_name.name, dentry->d_name.len, |
@@ -2922,7 +2922,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, | |||
2922 | if (check_path_shared(root, path)) | 2922 | if (check_path_shared(root, path)) |
2923 | goto out; | 2923 | goto out; |
2924 | index = btrfs_inode_ref_index(path->nodes[0], ref); | 2924 | index = btrfs_inode_ref_index(path->nodes[0], ref); |
2925 | btrfs_release_path(root, path); | 2925 | btrfs_release_path(path); |
2926 | 2926 | ||
2927 | di = btrfs_lookup_dir_index_item(trans, root, path, dir->i_ino, index, | 2927 | di = btrfs_lookup_dir_index_item(trans, root, path, dir->i_ino, index, |
2928 | dentry->d_name.name, dentry->d_name.len, 0); | 2928 | dentry->d_name.name, dentry->d_name.len, 0); |
@@ -3013,7 +3013,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, | |||
3013 | WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid); | 3013 | WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid); |
3014 | ret = btrfs_delete_one_dir_name(trans, root, path, di); | 3014 | ret = btrfs_delete_one_dir_name(trans, root, path, di); |
3015 | BUG_ON(ret); | 3015 | BUG_ON(ret); |
3016 | btrfs_release_path(root, path); | 3016 | btrfs_release_path(path); |
3017 | 3017 | ||
3018 | ret = btrfs_del_root_ref(trans, root->fs_info->tree_root, | 3018 | ret = btrfs_del_root_ref(trans, root->fs_info->tree_root, |
3019 | objectid, root->root_key.objectid, | 3019 | objectid, root->root_key.objectid, |
@@ -3026,7 +3026,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, | |||
3026 | 3026 | ||
3027 | leaf = path->nodes[0]; | 3027 | leaf = path->nodes[0]; |
3028 | btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); | 3028 | btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); |
3029 | btrfs_release_path(root, path); | 3029 | btrfs_release_path(path); |
3030 | index = key.offset; | 3030 | index = key.offset; |
3031 | } | 3031 | } |
3032 | 3032 | ||
@@ -3039,7 +3039,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, | |||
3039 | WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid); | 3039 | WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid); |
3040 | ret = btrfs_delete_one_dir_name(trans, root, path, di); | 3040 | ret = btrfs_delete_one_dir_name(trans, root, path, di); |
3041 | BUG_ON(ret); | 3041 | BUG_ON(ret); |
3042 | btrfs_release_path(root, path); | 3042 | btrfs_release_path(path); |
3043 | 3043 | ||
3044 | btrfs_i_size_write(dir, dir->i_size - name_len * 2); | 3044 | btrfs_i_size_write(dir, dir->i_size - name_len * 2); |
3045 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; | 3045 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; |
@@ -3477,7 +3477,7 @@ delete: | |||
3477 | BUG_ON(ret); | 3477 | BUG_ON(ret); |
3478 | pending_del_nr = 0; | 3478 | pending_del_nr = 0; |
3479 | } | 3479 | } |
3480 | btrfs_release_path(root, path); | 3480 | btrfs_release_path(path); |
3481 | goto search_again; | 3481 | goto search_again; |
3482 | } else { | 3482 | } else { |
3483 | path->slots[0]--; | 3483 | path->slots[0]--; |
@@ -3899,7 +3899,7 @@ static int fixup_tree_root_location(struct btrfs_root *root, | |||
3899 | if (ret) | 3899 | if (ret) |
3900 | goto out; | 3900 | goto out; |
3901 | 3901 | ||
3902 | btrfs_release_path(root->fs_info->tree_root, path); | 3902 | btrfs_release_path(path); |
3903 | 3903 | ||
3904 | new_root = btrfs_read_fs_root_no_name(root->fs_info, location); | 3904 | new_root = btrfs_read_fs_root_no_name(root->fs_info, location); |
3905 | if (IS_ERR(new_root)) { | 3905 | if (IS_ERR(new_root)) { |
@@ -5223,7 +5223,7 @@ again: | |||
5223 | kunmap(page); | 5223 | kunmap(page); |
5224 | free_extent_map(em); | 5224 | free_extent_map(em); |
5225 | em = NULL; | 5225 | em = NULL; |
5226 | btrfs_release_path(root, path); | 5226 | btrfs_release_path(path); |
5227 | trans = btrfs_join_transaction(root, 1); | 5227 | trans = btrfs_join_transaction(root, 1); |
5228 | if (IS_ERR(trans)) | 5228 | if (IS_ERR(trans)) |
5229 | return ERR_CAST(trans); | 5229 | return ERR_CAST(trans); |
@@ -5249,7 +5249,7 @@ not_found_em: | |||
5249 | em->block_start = EXTENT_MAP_HOLE; | 5249 | em->block_start = EXTENT_MAP_HOLE; |
5250 | set_bit(EXTENT_FLAG_VACANCY, &em->flags); | 5250 | set_bit(EXTENT_FLAG_VACANCY, &em->flags); |
5251 | insert: | 5251 | insert: |
5252 | btrfs_release_path(root, path); | 5252 | btrfs_release_path(path); |
5253 | if (em->start > start || extent_map_end(em) <= start) { | 5253 | if (em->start > start || extent_map_end(em) <= start) { |
5254 | printk(KERN_ERR "Btrfs: bad extent! em: [%llu %llu] passed " | 5254 | printk(KERN_ERR "Btrfs: bad extent! em: [%llu %llu] passed " |
5255 | "[%llu %llu]\n", (unsigned long long)em->start, | 5255 | "[%llu %llu]\n", (unsigned long long)em->start, |