summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2021-02-10 21:25:16 -0800
committerDavid Sterba <dsterba@suse.com>2021-04-19 17:25:14 +0200
commitf4639636b6b89aafe6071906305cb2a117e91a8b (patch)
tree80c9740d5ed9ff52c6ac9ccef682fa980a21c696 /fs/btrfs/inode.c
parent05947ae18692736c665be4dfa5bb39a54c6b98ae (diff)
downloadlinux-f4639636b6b89aafe6071906305cb2a117e91a8b.tar.bz2
btrfs: change return type to bool in btrfs_extent_readonly
btrfs_extent_readonly() checks if the block group is readonly, the bool return type should be used. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 988b53fa41e5..b6caa35ae03a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7262,14 +7262,14 @@ static struct extent_map *btrfs_new_extent_direct(struct btrfs_inode *inode,
return em;
}
-static int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
+static bool btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
{
struct btrfs_block_group *block_group;
- int readonly = 0;
+ bool readonly = false;
block_group = btrfs_lookup_block_group(fs_info, bytenr);
if (!block_group || block_group->ro)
- readonly = 1;
+ readonly = true;
if (block_group)
btrfs_put_block_group(block_group);
return readonly;