From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH] btrfs: send: pass bool for pending_move and refs_processed parameters
Date: Tue, 26 May 2026 13:29:49 +0200 [thread overview]
Message-ID: <20260526112949.124881-1-dsterba@suse.com> (raw)
We're passing simple indicators as int, switch them to bool types.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/send.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 89d72d8cb85fdf..a264f909d0b15c 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4157,7 +4157,7 @@ static int rename_current_inode(struct send_ctx *sctx,
/*
* This does all the move/link/unlink/rmdir magic.
*/
-static int process_recorded_refs(struct send_ctx *sctx, int *pending_move)
+static int process_recorded_refs(struct send_ctx *sctx, bool *pending_move)
{
struct btrfs_fs_info *fs_info = sctx->send_root->fs_info;
int ret = 0;
@@ -4417,7 +4417,7 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move)
goto out;
if (ret == 1) {
can_rename = false;
- *pending_move = 1;
+ *pending_move = true;
}
}
@@ -4428,7 +4428,7 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move)
goto out;
if (ret == 1) {
can_rename = false;
- *pending_move = 1;
+ *pending_move = true;
}
}
@@ -4793,7 +4793,7 @@ static int process_all_refs(struct send_ctx *sctx,
struct btrfs_key key;
struct btrfs_key found_key;
iterate_inode_ref_t cb;
- int pending_move = 0;
+ bool pending_move = false;
path = alloc_path_for_send();
if (!path)
@@ -6524,8 +6524,7 @@ static int process_all_extents(struct send_ctx *sctx)
}
static int process_recorded_refs_if_needed(struct send_ctx *sctx, bool at_end,
- int *pending_move,
- int *refs_processed)
+ bool *pending_move, bool *refs_processed)
{
int ret;
@@ -6543,7 +6542,7 @@ static int process_recorded_refs_if_needed(struct send_ctx *sctx, bool at_end,
if (ret < 0)
return ret;
- *refs_processed = 1;
+ *refs_processed = true;
return 0;
}
@@ -6563,8 +6562,8 @@ static int finish_inode_if_needed(struct send_ctx *sctx, bool at_end)
int need_chown = 0;
bool need_fileattr = false;
int need_truncate = 1;
- int pending_move = 0;
- int refs_processed = 0;
+ bool pending_move = false;
+ bool refs_processed = false;
if (sctx->ignore_cur_inode)
return 0;
--
2.54.0
reply other threads:[~2026-05-26 11:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260526112949.124881-1-dsterba@suse.com \
--to=dsterba@suse.com \
--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