diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-03-03 17:45:28 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-04-19 17:25:15 +0200 |
commit | 7000babddac651d6038200ee847d50a7f930a2cc (patch) | |
tree | 587bf93bfbc6a9141871076a77e40c86d9d641f8 /fs/btrfs | |
parent | 2ce73c633573f1472dc6367668cab836a57f6a55 (diff) |
btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned
Fix the following coccicheck warnings:
./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function
'dev_extent_hole_check_zoned' with return type bool.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 1c6810bbaf8b..d4ca721c1d91 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device, /* Given hole range was invalid (outside of device) */ if (ret == -ERANGE) { *hole_start += *hole_size; - *hole_size = 0; - return 1; + *hole_size = false; + return true; } *hole_start += zone_size; |