mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
btrfs: rename err to ret in __set_extent_bit()
Unify naming of return value to the preferred way. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
93bc66f4b6
commit
cbb6b5d208
@ -1059,7 +1059,7 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
|
|||||||
struct extent_state *prealloc = NULL;
|
struct extent_state *prealloc = NULL;
|
||||||
struct rb_node **p = NULL;
|
struct rb_node **p = NULL;
|
||||||
struct rb_node *parent = NULL;
|
struct rb_node *parent = NULL;
|
||||||
int err = 0;
|
int ret = 0;
|
||||||
u64 last_start;
|
u64 last_start;
|
||||||
u64 last_end;
|
u64 last_end;
|
||||||
u32 exclusive_bits = (bits & EXTENT_LOCKED);
|
u32 exclusive_bits = (bits & EXTENT_LOCKED);
|
||||||
@ -1122,7 +1122,7 @@ hit_next:
|
|||||||
if (state->state & exclusive_bits) {
|
if (state->state & exclusive_bits) {
|
||||||
*failed_start = state->start;
|
*failed_start = state->start;
|
||||||
cache_state(state, failed_state);
|
cache_state(state, failed_state);
|
||||||
err = -EEXIST;
|
ret = -EEXIST;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1158,7 +1158,7 @@ hit_next:
|
|||||||
if (state->state & exclusive_bits) {
|
if (state->state & exclusive_bits) {
|
||||||
*failed_start = start;
|
*failed_start = start;
|
||||||
cache_state(state, failed_state);
|
cache_state(state, failed_state);
|
||||||
err = -EEXIST;
|
ret = -EEXIST;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1175,12 +1175,12 @@ hit_next:
|
|||||||
prealloc = alloc_extent_state_atomic(prealloc);
|
prealloc = alloc_extent_state_atomic(prealloc);
|
||||||
if (!prealloc)
|
if (!prealloc)
|
||||||
goto search_again;
|
goto search_again;
|
||||||
err = split_state(tree, state, prealloc, start);
|
ret = split_state(tree, state, prealloc, start);
|
||||||
if (err)
|
if (ret)
|
||||||
extent_io_tree_panic(tree, state, "split", err);
|
extent_io_tree_panic(tree, state, "split", ret);
|
||||||
|
|
||||||
prealloc = NULL;
|
prealloc = NULL;
|
||||||
if (err)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
if (state->end <= end) {
|
if (state->end <= end) {
|
||||||
set_state_bits(tree, state, bits, changeset);
|
set_state_bits(tree, state, bits, changeset);
|
||||||
@ -1224,8 +1224,8 @@ hit_next:
|
|||||||
prealloc->end = this_end;
|
prealloc->end = this_end;
|
||||||
inserted_state = insert_state(tree, prealloc, bits, changeset);
|
inserted_state = insert_state(tree, prealloc, bits, changeset);
|
||||||
if (IS_ERR(inserted_state)) {
|
if (IS_ERR(inserted_state)) {
|
||||||
err = PTR_ERR(inserted_state);
|
ret = PTR_ERR(inserted_state);
|
||||||
extent_io_tree_panic(tree, prealloc, "insert", err);
|
extent_io_tree_panic(tree, prealloc, "insert", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_state(inserted_state, cached_state);
|
cache_state(inserted_state, cached_state);
|
||||||
@ -1244,16 +1244,16 @@ hit_next:
|
|||||||
if (state->state & exclusive_bits) {
|
if (state->state & exclusive_bits) {
|
||||||
*failed_start = start;
|
*failed_start = start;
|
||||||
cache_state(state, failed_state);
|
cache_state(state, failed_state);
|
||||||
err = -EEXIST;
|
ret = -EEXIST;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
prealloc = alloc_extent_state_atomic(prealloc);
|
prealloc = alloc_extent_state_atomic(prealloc);
|
||||||
if (!prealloc)
|
if (!prealloc)
|
||||||
goto search_again;
|
goto search_again;
|
||||||
err = split_state(tree, state, prealloc, end + 1);
|
ret = split_state(tree, state, prealloc, end + 1);
|
||||||
if (err)
|
if (ret)
|
||||||
extent_io_tree_panic(tree, state, "split", err);
|
extent_io_tree_panic(tree, state, "split", ret);
|
||||||
|
|
||||||
set_state_bits(tree, prealloc, bits, changeset);
|
set_state_bits(tree, prealloc, bits, changeset);
|
||||||
cache_state(prealloc, cached_state);
|
cache_state(prealloc, cached_state);
|
||||||
@ -1275,7 +1275,7 @@ out:
|
|||||||
if (prealloc)
|
if (prealloc)
|
||||||
free_extent_state(prealloc);
|
free_extent_state(prealloc);
|
||||||
|
|
||||||
return err;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user