btrfs: rename and switch to bool btrfs_chunk_readonly
authorAnand Jain <anand.jain@oracle.com>
Tue, 24 Aug 2021 05:27:42 +0000 (13:27 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:03:57 +0000 (19:03 +0200)
commita09f23c3554eec3451ce5d8891729b29b089e59f
tree6416b4d079b520ef1cd6ffb197ace0925dbadf9a
parent44bee215f72f13874c0e734a0712c2e3264c0108
btrfs: rename and switch to bool btrfs_chunk_readonly

btrfs_chunk_readonly() checks if the given chunk is writeable. It
returns 1 for readonly, and 0 for writeable. So the return argument type
bool shall suffice instead of the current type int.

Also, rename btrfs_chunk_readonly() to btrfs_chunk_writeable() as we
check if the bg is writeable, and helps to keep the logic at the parent
function simpler to understand.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h