diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-02-10 14:45:06 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-03-18 22:35:45 +0300 |
| commit | 6bb09d0c126334b950dc806180ad242fd6cc93ec (patch) | |
| tree | c9c5c18349be76ca34d5918f6d3a98f7caacb46f | |
| parent | dbee3fc55ac156006c47e71de3ed41a2307690c3 (diff) | |
| download | linux-6bb09d0c126334b950dc806180ad242fd6cc93ec.tar.xz | |
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>
| -rw-r--r-- | fs/btrfs/send.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 393c9ca5de90..0a908e1066a6 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -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; } /* |
