Skip to contentSkip to conversation

btrfs: block-group: Make read_block_group_item return void

PATCH In review Marcos Paulo de Souza 3 participants 3 messages Aug 17, 2020 – Aug 19, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: block-group: Make read_block_group_item return void

From: Marcos Paulo de Souza <[email protected]>

Since it's inclusion on 9afc66498a0b
("btrfs: block-group: refactor how we read one block group item") this function always returned 0, so there is no need to check for the returned value.

---
 fs/btrfs/block-group.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
fs/btrfs/block-group.c +2 -6
index 5b49e23e10d0..3891a1f731ba 100644
@@ -1874,7 +1874,7 @@ static int check_chunk_block_group_mappings(struct btrfs_fs_info *fs_info)
 	return ret;
 }
 
-static int read_block_group_item(struct btrfs_block_group *cache,
+static void read_block_group_item(struct btrfs_block_group *cache,
 				 struct btrfs_path *path,
 				 const struct btrfs_key *key)
 {
@@ -1888,8 +1888,6 @@ static int read_block_group_item(struct btrfs_block_group *cache,
 			   sizeof(bgi));
 	cache->used = btrfs_stack_block_group_used(&bgi);
 	cache->flags = btrfs_stack_block_group_flags(&bgi);
-
-	return 0;
 }
 
 static int read_one_block_group(struct btrfs_fs_info *info,
@@ -1908,9 +1906,7 @@ static int read_one_block_group(struct btrfs_fs_info *info,
 	if (!cache)
 		return -ENOMEM;
 
-	ret = read_block_group_item(cache, path, key);
-	if (ret < 0)
-		goto error;
+	read_block_group_item(cache, path, key);
 
 	if (need_clear) {
 		/*
Signature · 1 line
2.28.0