From: Nikolay Borisov <nborisov@suse.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix a memory allocation failure test
Date: Sun, 30 Oct 2022 20:32:08 +0200 [thread overview]
Message-ID: <4c92f908-f7e0-30d1-13a0-0230cc99f9ca@suse.com> (raw)
In-Reply-To: <34dff6b621770b1f8078ce6c715b61c5908e1ad1.1667115312.git.christophe.jaillet@wanadoo.fr>
On 30.10.22 г. 9:35 ч., Christophe JAILLET wrote:
> 'dip' is tested instead of 'dip->csums'.
> Fix it.
>
> Fixes: 642c5d34da53 ("btrfs: allocate the btrfs_dio_private as part of the iomap dio bio")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 966cc050cdbb..3bbd2dc6282f 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -8078,7 +8078,7 @@ static void btrfs_submit_direct(const struct iomap_iter *iter,
> */
> status = BLK_STS_RESOURCE;
> dip->csums = kcalloc(nr_sectors, fs_info->csum_size, GFP_NOFS);
> - if (!dip)
> + if (!dip->csums)
> goto out_err;
>
> status = btrfs_lookup_bio_sums(inode, dio_bio, dip->csums);
next prev parent reply other threads:[~2022-10-30 18:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 7:35 [PATCH] btrfs: Fix a memory allocation failure test Christophe JAILLET
2022-10-30 18:32 ` Nikolay Borisov [this message]
2022-10-31 14:07 ` David Sterba
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=4c92f908-f7e0-30d1-13a0-0230cc99f9ca@suse.com \
--to=nborisov@suse.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 \
/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;
as well as URLs for NNTP newsgroup(s).