Commit 0e3dd5bc authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by David Sterba

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: default avatarSu Yue <l@damenly.su>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent f6f39f7a
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment