btrfs: Remove useless statement in split_node
PATCH 1/1 btrfs: Remove useless statement in split_node
At the point when we set 'ret = 0' it's guaranteed that the function is going to return 0 so directly return 0. No functional changes.
Signed-off-by Nikolay Borisov <[email protected]>
--- fs/btrfs/ctree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/ctree.c +1 -2
@@ -3449,7 +3449,6 @@ static noinline int split_node(struct btrfs_trans_handle *trans, (c_nritems - mid) * sizeof(struct btrfs_key_ptr));btrfs_set_header_nritems (split, c_nritems - mid);btrfs_set_header_nritems (c, mid); - ret =0 ;btrfs_mark_buffer_dirty (c);btrfs_mark_buffer_dirty (split);
@@ -3467,7 +3466,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_tree_unlock (split);free_extent_buffer (split); } -return ret; +return 0 ; }/*
Signature · 1 line
2.25.1
Quoted 2 lines · Nikolay Borisov
At the point when we set 'ret = 0' it's guaranteed that the function is going to return 0 so directly return 0. No functional changes.
Indeed,
Reviewed-by Johannes Thumshirn <[email protected]>
Quoted 4 lines · Nikolay Borisov
At the point when we set 'ret = 0' it's guaranteed that the function is going to return 0 so directly return 0. No functional changes.
Signed-off-by Nikolay Borisov <[email protected]>
Added to misc-next, thanks.