mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
btrfs: send: simplify return logic from record_new_ref_if_needed()
There is no need to have an 'out' label and jump into it since there are no resource cleanups to perform (release locks, free memory, etc), so make this simpler by removing the label and goto and instead return directly. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9435159f28
commit
25e5dee510
|
|
@ -4683,7 +4683,7 @@ static int record_ref_in_tree(struct rb_root *root, struct list_head *refs,
|
|||
|
||||
static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
struct send_ctx *sctx = ctx;
|
||||
struct rb_node *node = NULL;
|
||||
struct recorded_ref data;
|
||||
|
|
@ -4692,7 +4692,7 @@ static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx)
|
|||
|
||||
ret = get_inode_gen(sctx->send_root, dir, &dir_gen);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
data.dir = dir;
|
||||
data.dir_gen = dir_gen;
|
||||
|
|
@ -4706,7 +4706,7 @@ static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx)
|
|||
&sctx->new_refs, name, dir, dir_gen,
|
||||
sctx);
|
||||
}
|
||||
out:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user