diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-11-24 17:49:25 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-08 17:54:16 +0300 |
commit | a2633b6a29e9c916ef1a0389826a2e4ebbe6b259 (patch) | |
tree | 782ebb2325763f26fd1741b1f79ddcacd4f4f89c /fs/btrfs/transaction.c | |
parent | 8a8f4deaba79ca4cc0ae01f9a3b8f5594810de5e (diff) | |
download | linux-a2633b6a29e9c916ef1a0389826a2e4ebbe6b259.tar.xz |
btrfs: return bool from btrfs_should_end_transaction
Results in slightly smaller code.
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11 (-11)
Function old new delta
btrfs_should_end_transaction 96 85 -11
Total: Before=20070, After=20059, chg -0.05%
Signed-off-by: Nikolay Borisov <nborisov@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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 10338363754e..238e5a2c0696 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -908,14 +908,14 @@ static bool should_end_transaction(struct btrfs_trans_handle *trans) return !!btrfs_block_rsv_check(&fs_info->global_block_rsv, 5); } -int btrfs_should_end_transaction(struct btrfs_trans_handle *trans) +bool btrfs_should_end_transaction(struct btrfs_trans_handle *trans) { struct btrfs_transaction *cur_trans = trans->transaction; smp_mb(); if (cur_trans->state >= TRANS_STATE_COMMIT_START || cur_trans->delayed_refs.flushing) - return 1; + return true; return should_end_transaction(trans); } |