mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 01:59:51 +02:00
btrfs: send: simplify return logic from record_changed_ref()
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
43090f2ca9
commit
892772c389
1 changed files with 4 additions and 6 deletions
|
|
@ -4766,20 +4766,18 @@ static int record_deleted_ref(struct send_ctx *sctx)
|
|||
|
||||
static int record_changed_ref(struct send_ctx *sctx)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
ret = iterate_inode_ref(sctx->send_root, sctx->left_path,
|
||||
sctx->cmp_key, 0, record_new_ref_if_needed, sctx);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
ret = iterate_inode_ref(sctx->parent_root, sctx->right_path,
|
||||
sctx->cmp_key, 0, record_deleted_ref_if_needed, sctx);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
ret = 0;
|
||||
return ret;
|
||||
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue