linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: block-group: Make read_block_group_item return void
@ 2020-08-17 13:56 Marcos Paulo de Souza
  2020-08-17 13:59 ` Nikolay Borisov
  2020-08-19 15:53 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Paulo de Souza @ 2020-08-17 13:56 UTC (permalink / raw)
  To: dsterba, linux-btrfs; +Cc: Marcos Paulo de Souza

From: Marcos Paulo de Souza <mpdesouza@suse.com>

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.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 fs/btrfs/block-group.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 5b49e23e10d0..3891a1f731ba 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -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) {
 		/*
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: block-group: Make read_block_group_item return void
  2020-08-17 13:56 [PATCH] btrfs: block-group: Make read_block_group_item return void Marcos Paulo de Souza
@ 2020-08-17 13:59 ` Nikolay Borisov
  2020-08-19 15:53 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2020-08-17 13:59 UTC (permalink / raw)
  To: Marcos Paulo de Souza, dsterba, linux-btrfs; +Cc: Marcos Paulo de Souza



On 17.08.20 г. 16:56 ч., Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> 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.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: block-group: Make read_block_group_item return void
  2020-08-17 13:56 [PATCH] btrfs: block-group: Make read_block_group_item return void Marcos Paulo de Souza
  2020-08-17 13:59 ` Nikolay Borisov
@ 2020-08-19 15:53 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-08-19 15:53 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: dsterba, linux-btrfs, Marcos Paulo de Souza

On Mon, Aug 17, 2020 at 10:56:10AM -0300, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> 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.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-19 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 13:56 [PATCH] btrfs: block-group: Make read_block_group_item return void Marcos Paulo de Souza
2020-08-17 13:59 ` Nikolay Borisov
2020-08-19 15:53 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).