From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 23/26] btrfs: send: simplify return logic from send_verity()
Date: Wed, 19 Feb 2025 11:43:23 +0000 [thread overview]
Message-ID: <231e2cd5b7ff30e91c66cc72efd4d4564ed0deff.1739965104.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1739965104.git.fdmanana@suse.com>
From: Filipe Manana <fdmanana@suse.com>
There's no need for the 'out' label as there are no resources to cleanup
in case of an error and we can directly return if begin_cmd() fails.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
fs/btrfs/send.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 0cbc8b5b6fab..f161e6a695bd 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -5122,7 +5122,7 @@ static int send_verity(struct send_ctx *sctx, struct fs_path *path,
ret = begin_cmd(sctx, BTRFS_SEND_C_ENABLE_VERITY);
if (ret < 0)
- goto out;
+ return ret;
TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, path);
TLV_PUT_U8(sctx, BTRFS_SEND_A_VERITY_ALGORITHM,
@@ -5137,7 +5137,6 @@ static int send_verity(struct send_ctx *sctx, struct fs_path *path,
ret = send_cmd(sctx);
tlv_put_failure:
-out:
return ret;
}
--
2.45.2
next prev parent reply other threads:[~2025-02-19 11:43 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 11:43 [PATCH 00/26] btrfs: avoid repeated path computations and allocations for send fdmanana
2025-02-19 11:43 ` [PATCH 01/26] btrfs: send: remove duplicated logic from fs_path_reset() fdmanana
2025-02-19 11:43 ` [PATCH 02/26] btrfs: send: make fs_path_len() inline and constify its argument fdmanana
2025-02-19 11:43 ` [PATCH 03/26] btrfs: send: always use fs_path_len() to determine a path's length fdmanana
2025-02-19 11:43 ` [PATCH 04/26] btrfs: send: simplify return logic from fs_path_prepare_for_add() fdmanana
2025-02-19 11:43 ` [PATCH 05/26] btrfs: send: simplify return logic from fs_path_add() fdmanana
2025-02-19 11:43 ` [PATCH 06/26] btrfs: send: implement fs_path_add_path() using fs_path_add() fdmanana
2025-02-19 11:43 ` [PATCH 07/26] btrfs: send: simplify return logic from fs_path_add_from_extent_buffer() fdmanana
2025-02-19 11:43 ` [PATCH 08/26] btrfs: send: return -ENAMETOOLONG when attempting a path that is too long fdmanana
2025-02-19 11:43 ` [PATCH 09/26] btrfs: send: simplify return logic from __get_cur_name_and_parent() fdmanana
2025-02-19 11:43 ` [PATCH 10/26] btrfs: send: simplify return logic from is_inode_existent() fdmanana
2025-02-19 11:43 ` [PATCH 11/26] btrfs: send: simplify return logic from get_cur_inode_state() fdmanana
2025-02-19 11:43 ` [PATCH 12/26] btrfs: send: factor out common logic when sending xattrs fdmanana
2025-02-19 11:43 ` [PATCH 13/26] btrfs: send: only use booleans variables at process_recorded_refs() fdmanana
2025-02-19 11:43 ` [PATCH 14/26] btrfs: send: add and use helper to rename current inode when processing refs fdmanana
2025-02-19 11:43 ` [PATCH 15/26] btrfs: send: simplify return logic from send_remove_xattr() fdmanana
2025-02-19 11:43 ` [PATCH 16/26] btrfs: send: simplify return logic from record_new_ref_if_needed() fdmanana
2025-02-19 11:43 ` [PATCH 17/26] btrfs: send: simplify return logic from record_deleted_ref_if_needed() fdmanana
2025-02-19 11:43 ` [PATCH 18/26] btrfs: send: simplify return logic from record_new_ref() fdmanana
2025-02-19 11:43 ` [PATCH 19/26] btrfs: send: simplify return logic from record_deleted_ref() fdmanana
2025-02-19 11:43 ` [PATCH 20/26] btrfs: send: simplify return logic from record_changed_ref() fdmanana
2025-02-19 11:43 ` [PATCH 21/26] btrfs: send: remove unnecessary return variable from process_new_xattr() fdmanana
2025-02-19 11:43 ` [PATCH 22/26] btrfs: send: simplify return logic from process_changed_xattr() fdmanana
2025-02-19 11:43 ` fdmanana [this message]
2025-02-19 11:43 ` [PATCH 24/26] btrfs: send: keep the current inode's path cached fdmanana
2025-02-19 11:43 ` [PATCH 25/26] btrfs: send: avoid path allocation for the current inode when issuing commands fdmanana
2025-02-19 11:43 ` [PATCH 26/26] btrfs: send: simplify return logic from send_set_xattr() fdmanana
2025-02-20 11:04 ` [PATCH v2 00/30] btrfs: avoid repeated path computations and allocations for send fdmanana
2025-02-20 11:04 ` [PATCH v2 01/30] btrfs: send: remove duplicated logic from fs_path_reset() fdmanana
2025-02-20 11:04 ` [PATCH v2 02/30] btrfs: send: make fs_path_len() inline and constify its argument fdmanana
2025-02-20 11:04 ` [PATCH v2 03/30] btrfs: send: always use fs_path_len() to determine a path's length fdmanana
2025-02-20 11:04 ` [PATCH v2 04/30] btrfs: send: simplify return logic from fs_path_prepare_for_add() fdmanana
2025-02-20 11:04 ` [PATCH v2 05/30] btrfs: send: simplify return logic from fs_path_add() fdmanana
2025-02-20 11:04 ` [PATCH v2 06/30] btrfs: send: implement fs_path_add_path() using fs_path_add() fdmanana
2025-02-20 11:04 ` [PATCH v2 07/30] btrfs: send: simplify return logic from fs_path_add_from_extent_buffer() fdmanana
2025-02-20 11:04 ` [PATCH v2 08/30] btrfs: send: return -ENAMETOOLONG when attempting a path that is too long fdmanana
2025-02-20 11:04 ` [PATCH v2 09/30] btrfs: send: simplify return logic from __get_cur_name_and_parent() fdmanana
2025-02-20 11:04 ` [PATCH v2 10/30] btrfs: send: simplify return logic from is_inode_existent() fdmanana
2025-02-20 11:04 ` [PATCH v2 11/30] btrfs: send: simplify return logic from get_cur_inode_state() fdmanana
2025-02-20 11:04 ` [PATCH v2 12/30] btrfs: send: factor out common logic when sending xattrs fdmanana
2025-02-20 11:04 ` [PATCH v2 13/30] btrfs: send: only use booleans variables at process_recorded_refs() fdmanana
2025-02-20 11:04 ` [PATCH v2 14/30] btrfs: send: add and use helper to rename current inode when processing refs fdmanana
2025-02-20 11:04 ` [PATCH v2 15/30] btrfs: send: simplify return logic from send_remove_xattr() fdmanana
2025-02-20 11:04 ` [PATCH v2 16/30] btrfs: send: simplify return logic from record_new_ref_if_needed() fdmanana
2025-02-20 11:04 ` [PATCH v2 17/30] btrfs: send: simplify return logic from record_deleted_ref_if_needed() fdmanana
2025-02-20 11:04 ` [PATCH v2 18/30] btrfs: send: simplify return logic from record_new_ref() fdmanana
2025-02-20 11:04 ` [PATCH v2 19/30] btrfs: send: simplify return logic from record_deleted_ref() fdmanana
2025-02-20 11:04 ` [PATCH v2 20/30] btrfs: send: simplify return logic from record_changed_ref() fdmanana
2025-02-20 11:04 ` [PATCH v2 21/30] btrfs: send: remove unnecessary return variable from process_new_xattr() fdmanana
2025-02-20 11:04 ` [PATCH v2 22/30] btrfs: send: simplify return logic from process_changed_xattr() fdmanana
2025-02-20 11:04 ` [PATCH v2 23/30] btrfs: send: simplify return logic from send_verity() fdmanana
2025-02-20 11:04 ` [PATCH v2 24/30] btrfs: send: simplify return logic from send_rename() fdmanana
2025-02-20 11:04 ` [PATCH v2 25/30] btrfs: send: simplify return logic from send_link() fdmanana
2025-02-20 11:04 ` [PATCH v2 26/30] btrfs: send: simplify return logic from send_unlink() fdmanana
2025-02-20 11:04 ` [PATCH v2 27/30] btrfs: send: simplify return logic from send_rmdir() fdmanana
2025-02-20 11:04 ` [PATCH v2 28/30] btrfs: send: keep the current inode's path cached fdmanana
2025-02-20 11:04 ` [PATCH v2 29/30] btrfs: send: avoid path allocation for the current inode when issuing commands fdmanana
2025-02-20 11:04 ` [PATCH v2 30/30] btrfs: send: simplify return logic from send_set_xattr() fdmanana
2025-02-20 23:46 ` [PATCH v2 00/30] btrfs: avoid repeated path computations and allocations for send David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=231e2cd5b7ff30e91c66cc72efd4d4564ed0deff.1739965104.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox