mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
btrfs: send: simplify send_create_inode_if_needed
The out label is being overused, we can simply return if the condition permits. No functional changes. Reviewed-by: Su Yue <l@damenly.su> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f6f39f7a0a
commit
0e3dd5bce8
@ -2720,19 +2720,12 @@ static int send_create_inode_if_needed(struct send_ctx *sctx)
|
||||
if (S_ISDIR(sctx->cur_inode_mode)) {
|
||||
ret = did_create_dir(sctx, sctx->cur_ino);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
if (ret) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
return ret;
|
||||
else if (ret > 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = send_create_inode(sctx, sctx->cur_ino);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
out:
|
||||
return ret;
|
||||
return send_create_inode(sctx, sctx->cur_ino);
|
||||
}
|
||||
|
||||
struct recorded_ref {
|
||||
|
Loading…
x
Reference in New Issue
Block a user