diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-02-10 12:18:50 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-07 18:55:56 +0200 |
| commit | 6fa972956830b17b0bf905a5b3da87517300dc0b (patch) | |
| tree | 3ad25e54b6af350fda85ab3acdf2617f8e1e5027 /fs/btrfs/transaction.c | |
| parent | 521f8672b6b34a8959f8b5a5859364e52aa1ba8a (diff) | |
| download | linux-next-6fa972956830b17b0bf905a5b3da87517300dc0b.tar.gz linux-next-6fa972956830b17b0bf905a5b3da87517300dc0b.zip | |
btrfs: pass literal booleans to functions that take boolean arguments
We have several functions with parameters defined as booleans but then we
have callers passing integers, 0 or 1, instead of false and true. While
this isn't a bug since 0 and 1 are converted to false and true, it is odd
and less readable. Change the callers to pass true and false literals
instead.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
| -rw-r--r-- | fs/btrfs/transaction.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2df80452b0b7..ca780e332a5b 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -503,7 +503,7 @@ int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans, return 0; mutex_lock(&fs_info->reloc_mutex); - ret = record_root_in_trans(trans, root, 0); + ret = record_root_in_trans(trans, root, false); mutex_unlock(&fs_info->reloc_mutex); return ret; @@ -1579,7 +1579,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, * recorded root will never be updated again, causing an outdated root * item. */ - ret = record_root_in_trans(trans, src, 1); + ret = record_root_in_trans(trans, src, true); if (ret) return ret; @@ -1642,7 +1642,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, * Or it won't be committed again onto disk after later * insert_dir_item() */ - return record_root_in_trans(trans, parent, 1); + return record_root_in_trans(trans, parent, true); } /* @@ -1726,7 +1726,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, trans->transid, trans->bytes_reserved, 1); parent_root = parent_inode->root; - ret = record_root_in_trans(trans, parent_root, 0); + ret = record_root_in_trans(trans, parent_root, false); if (unlikely(ret)) goto fail; cur_time = current_time(&parent_inode->vfs_inode); @@ -1774,7 +1774,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, goto fail; } - ret = record_root_in_trans(trans, root, 0); + ret = record_root_in_trans(trans, root, false); if (unlikely(ret)) { btrfs_abort_transaction(trans, ret); goto fail; |
