diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-02-18 15:44:13 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-03-18 20:35:45 +0100 |
commit | 25e5dee510a75e01a55f113e6411ff2b1c99e73c (patch) | |
tree | 697faf5da2d6dc7794ce4f515e50d622e0063c4a | |
parent | 9435159f28c4911ca33a69d8fe197baf368261df (diff) |
btrfs: send: simplify return logic from record_new_ref_if_needed()
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 5fd3deaf14d60..96aa519e791ac 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4683,7 +4683,7 @@ out: static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx) { - int ret = 0; + int ret; struct send_ctx *sctx = ctx; struct rb_node *node = NULL; struct recorded_ref data; @@ -4692,7 +4692,7 @@ static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx) ret = get_inode_gen(sctx->send_root, dir, &dir_gen); if (ret < 0) - goto out; + return ret; data.dir = dir; data.dir_gen = dir_gen; @@ -4706,7 +4706,7 @@ static int record_new_ref_if_needed(u64 dir, struct fs_path *name, void *ctx) &sctx->new_refs, name, dir, dir_gen, sctx); } -out: + return ret; } |