diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index b6cbeed226b1..b0e18d986e0a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -3211,7 +3211,6 @@ int btrfs_truncate_item(struct btrfs_trans_handle *trans, | |||
3211 | struct btrfs_path *path, | 3211 | struct btrfs_path *path, |
3212 | u32 new_size, int from_end) | 3212 | u32 new_size, int from_end) |
3213 | { | 3213 | { |
3214 | int ret = 0; | ||
3215 | int slot; | 3214 | int slot; |
3216 | struct extent_buffer *leaf; | 3215 | struct extent_buffer *leaf; |
3217 | struct btrfs_item *item; | 3216 | struct btrfs_item *item; |
@@ -3309,12 +3308,11 @@ int btrfs_truncate_item(struct btrfs_trans_handle *trans, | |||
3309 | btrfs_set_item_size(leaf, item, new_size); | 3308 | btrfs_set_item_size(leaf, item, new_size); |
3310 | btrfs_mark_buffer_dirty(leaf); | 3309 | btrfs_mark_buffer_dirty(leaf); |
3311 | 3310 | ||
3312 | ret = 0; | ||
3313 | if (btrfs_leaf_free_space(root, leaf) < 0) { | 3311 | if (btrfs_leaf_free_space(root, leaf) < 0) { |
3314 | btrfs_print_leaf(root, leaf); | 3312 | btrfs_print_leaf(root, leaf); |
3315 | BUG(); | 3313 | BUG(); |
3316 | } | 3314 | } |
3317 | return ret; | 3315 | return 0; |
3318 | } | 3316 | } |
3319 | 3317 | ||
3320 | /* | 3318 | /* |
@@ -3324,7 +3322,6 @@ int btrfs_extend_item(struct btrfs_trans_handle *trans, | |||
3324 | struct btrfs_root *root, struct btrfs_path *path, | 3322 | struct btrfs_root *root, struct btrfs_path *path, |
3325 | u32 data_size) | 3323 | u32 data_size) |
3326 | { | 3324 | { |
3327 | int ret = 0; | ||
3328 | int slot; | 3325 | int slot; |
3329 | struct extent_buffer *leaf; | 3326 | struct extent_buffer *leaf; |
3330 | struct btrfs_item *item; | 3327 | struct btrfs_item *item; |
@@ -3389,12 +3386,11 @@ int btrfs_extend_item(struct btrfs_trans_handle *trans, | |||
3389 | btrfs_set_item_size(leaf, item, old_size + data_size); | 3386 | btrfs_set_item_size(leaf, item, old_size + data_size); |
3390 | btrfs_mark_buffer_dirty(leaf); | 3387 | btrfs_mark_buffer_dirty(leaf); |
3391 | 3388 | ||
3392 | ret = 0; | ||
3393 | if (btrfs_leaf_free_space(root, leaf) < 0) { | 3389 | if (btrfs_leaf_free_space(root, leaf) < 0) { |
3394 | btrfs_print_leaf(root, leaf); | 3390 | btrfs_print_leaf(root, leaf); |
3395 | BUG(); | 3391 | BUG(); |
3396 | } | 3392 | } |
3397 | return ret; | 3393 | return 0; |
3398 | } | 3394 | } |
3399 | 3395 | ||
3400 | /* | 3396 | /* |