From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix an error handling path in btrfs_read_sys_array()
Date: Sun, 15 May 2022 06:57:25 +0800 [thread overview]
Message-ID: <120e4c34-da48-7d86-4a50-c31a3804600d@gmx.com> (raw)
In-Reply-To: <d915ceb4d459aff89c0264113db21592a6806db1.1652517184.git.christophe.jaillet@wanadoo.fr>
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@wanadoo.fr>
Reviewed-by: Qu Wenruo <wqu@suse.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);
next prev parent reply other threads:[~2022-05-14 22:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 12:01 Christophe JAILLET
2022-05-14 22:57 ` Qu Wenruo [this message]
2022-05-16 13:54 ` Dan Carpenter
2022-05-16 15:01 ` David Sterba
2022-05-16 17:42 ` Christophe JAILLET
2022-05-17 5:55 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=120e4c34-da48-7d86-4a50-c31a3804600d@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®