]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: send: pass bool for pending_move and refs_processed parameters
authorDavid Sterba <dsterba@suse.com>
Tue, 26 May 2026 11:29:49 +0000 (13:29 +0200)
committerJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 9 Jun 2026 16:22:45 +0000 (18:22 +0200)
We're passing simple indicators as int, switch them to bool types.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c

index c36b741dbe6de4c461c3a176c865eba40579c34a..40d63668a1a2d91948911b7ecb1b93df83219ffe 100644 (file)
@@ -4130,7 +4130,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;
@@ -4390,7 +4390,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;
                        }
                }
 
@@ -4401,7 +4401,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;
                        }
                }
 
@@ -4766,7 +4766,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)
@@ -6497,8 +6497,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;
 
@@ -6516,7 +6515,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;
 }
 
@@ -6536,8 +6535,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;