[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <120e4c34-da48-7d86-4a50-c31a3804600d@gmx.com>
Date: Sun, 15 May 2022 06:57:25 +0800
From: Qu Wenruo <quwenruo.btrfs@....com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, Qu Wenruo <wqu@...e.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix an error handling path in
btrfs_read_sys_array()
On 2022/5/14 20:01, Christophe JAILLET wrote:
> If alloc_dummy_extent_buffer() we should return an error code, not 0 that
> would mean success.
>
> Fixes: a1fc41ac28d3 ("btrfs: use dummy extent buffer for super block sys chunk array read")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Qu Wenruo <wqu@...e.com>
All my fault, thanks for catching it.
Qu
> ---
> 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 b2d5a54ea172..9c20049d1fec 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -7359,7 +7359,7 @@ int btrfs_read_sys_array(struct btrfs_fs_info *fs_info)
> */
> sb = alloc_dummy_extent_buffer(fs_info, BTRFS_SUPER_INFO_OFFSET);
> if (!sb)
> - return PTR_ERR(sb);
> + return -ENOMEM;
> set_extent_buffer_uptodate(sb);
>
> write_extent_buffer(sb, super_copy, 0, BTRFS_SUPER_INFO_SIZE);
Powered by blists - more mailing lists