linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block()
@ 2019-08-09 14:07 Dan Carpenter
  2019-08-09 14:36 ` Nikolay Borisov
  2019-08-22 14:14 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-08-09 14:07 UTC (permalink / raw)
  To: Chris Mason, Nikolay Borisov
  Cc: Josef Bacik, David Sterba, linux-btrfs, kernel-janitors

The btrfs_get_chunk_map() never returns NULL, it returns error pointers.

Fixes: 89b798ad1b42 ("btrfs: Use btrfs_get_io_geometry appropriately")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 fs/btrfs/volumes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 6edd1d57e530..e69d135c7d3c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5818,7 +5818,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
 		return ret;
 
 	em = btrfs_get_chunk_map(fs_info, logical, *length);
-	ASSERT(em);
+	ASSERT(!IS_ERR(em));
 	map = em->map_lookup;
 
 	*length = geom.len;
-- 
2.20.1


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

* Re: [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block()
  2019-08-09 14:07 [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block() Dan Carpenter
@ 2019-08-09 14:36 ` Nikolay Borisov
  2019-08-22 14:14 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2019-08-09 14:36 UTC (permalink / raw)
  To: Dan Carpenter, Chris Mason
  Cc: David Sterba, Josef Bacik, kernel-janitors, linux-btrfs



On 9.08.19 г. 17:07 ч., Dan Carpenter wrote:
> The btrfs_get_chunk_map() never returns NULL, it returns error pointers.
> 
> Fixes: 89b798ad1b42 ("btrfs: Use btrfs_get_io_geometry appropriately")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

> ---
>  fs/btrfs/volumes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 6edd1d57e530..e69d135c7d3c 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -5818,7 +5818,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
>  		return ret;
>  
>  	em = btrfs_get_chunk_map(fs_info, logical, *length);
> -	ASSERT(em);
> +	ASSERT(!IS_ERR(em));
>  	map = em->map_lookup;
>  
>  	*length = geom.len;
> 

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

* Re: [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block()
  2019-08-09 14:07 [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block() Dan Carpenter
  2019-08-09 14:36 ` Nikolay Borisov
@ 2019-08-22 14:14 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2019-08-22 14:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Chris Mason, Nikolay Borisov, Josef Bacik, David Sterba,
	linux-btrfs, kernel-janitors

On Fri, Aug 09, 2019 at 05:07:39PM +0300, Dan Carpenter wrote:
> The btrfs_get_chunk_map() never returns NULL, it returns error pointers.
> 
> Fixes: 89b798ad1b42 ("btrfs: Use btrfs_get_io_geometry appropriately")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Queued for 5.3, thanks.

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

end of thread, other threads:[~2019-08-22 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 14:07 [PATCH] Btrfs: Fix an assert statement in __btrfs_map_block() Dan Carpenter
2019-08-09 14:36 ` Nikolay Borisov
2019-08-22 14:14 ` 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).