mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 20:22:08 +02:00
btrfs: send: simplify return logic from is_inode_existent()
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
dbee3fc55a
commit
6bb09d0c12
|
|
@ -1950,17 +1950,14 @@ static int is_inode_existent(struct send_ctx *sctx, u64 ino, u64 gen,
|
|||
|
||||
ret = get_cur_inode_state(sctx, ino, gen, send_gen, parent_gen);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
if (ret == inode_state_no_change ||
|
||||
ret == inode_state_did_create ||
|
||||
ret == inode_state_will_delete)
|
||||
ret = 1;
|
||||
else
|
||||
ret = 0;
|
||||
return 1;
|
||||
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user