diff mbox series

[2/5] btrfs: btrfs_extent_readonly() change return type to bool

Message ID 3c0e3bc3fa0577bded592b37d281e8fd27a8f779.1613019838.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series cleanups btrfs_extent_readonly() and scrub, part1 | expand

Commit Message

Anand Jain Feb. 11, 2021, 5:25 a.m. UTC
btrfs_extent_readonly() checks if the bg is readonly, the bool return type
will suffice its need.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/inode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Johannes Thumshirn Feb. 11, 2021, 1 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2ed7d736e39a..ebb2b8e3a71c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7256,14 +7256,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;