diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-03-30 15:39:02 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-04-17 18:01:22 +0200 |
commit | e4773b57b8949cec8743445e7877315c012fe5ca (patch) | |
tree | 72aa5c8f29e1f65ef139ae904812c5d1ec94bc03 /fs/btrfs/transaction.c | |
parent | b73a6fd1b1efd799c6e3d14a922887f4453fea17 (diff) | |
download | lwn-e4773b57b8949cec8743445e7877315c012fe5ca.tar.gz lwn-e4773b57b8949cec8743445e7877315c012fe5ca.zip |
btrfs: make btrfs_block_rsv_full() check more boolean when starting transaction
When starting a transaction we are comparing the result of a call to
btrfs_block_rsv_full() with 0, but the function returns a boolean. While
in practice it is not incorrect, as 0 is equivalent to false, it makes it
a bit odd and less readable. So update the check to not compare against 0
and instead use the logical not (!) operator.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c8e503e5db4c..c497886d30e6 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -607,7 +607,7 @@ start_transaction(struct btrfs_root *root, unsigned int num_items, */ num_bytes = btrfs_calc_insert_metadata_size(fs_info, num_items); if (flush == BTRFS_RESERVE_FLUSH_ALL && - btrfs_block_rsv_full(delayed_refs_rsv) == 0) { + !btrfs_block_rsv_full(delayed_refs_rsv)) { delayed_refs_bytes = num_bytes; num_bytes <<= 1; } |