[PATCH] btrfs: fix boolreturn.cocci warnings

From: kernel test robot
Date: Sun Nov 01 2020 - 01:22:34 EST


From: kernel test robot <lkp@xxxxxxxxx>

fs/btrfs/space-info.c:810:9-10: WARNING: return of 0/1 in function 'need_preemptive_reclaim' with return type bool

Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: fc96d3794eb2 ("btrfs: rename need_do_async_reclaim")
CC: Josef Bacik <josef@xxxxxxxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

tree: https://github.com/kdave/btrfs-devel.git for-next-20201030
head: 757db2d191a0eb51ffb9acf023e31393d731b0a9
commit: fc96d3794eb2f38f91dc1647ab55967190b68482 [14921/14978] btrfs: rename need_do_async_reclaim

space-info.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -807,10 +807,10 @@ static inline bool need_preemptive_recla

/* If we're just plain full then async reclaim just slows us down. */
if ((space_info->bytes_used + space_info->bytes_reserved) >= thresh)
- return 0;
+ return false;

if (!btrfs_calc_reclaim_metadata_size(fs_info, space_info))
- return 0;
+ return false;

return (used >= thresh && !btrfs_fs_closing(fs_info) &&
!test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state));