From: Christoph Hellwig <hch@infradead.org>
To: Chao Yu <chao@kernel.org>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] f2fs: fix to check bio after __blkdev_issue_discard()
Date: Tue, 25 Nov 2025 22:41:22 -0800 [thread overview]
Message-ID: <aSahEs04brIrBcue@infradead.org> (raw)
In-Reply-To: <20251126061437.658896-1-chao@kernel.org>
On Wed, Nov 26, 2025 at 02:14:37PM +0800, Chao Yu wrote:
> Previously, __blkdev_issue_discard() will always returned valid bio,
> after commit e8b4869bc78d ("block: add a blk_alloc_discard_bio helper"),
> it can return bio w/ NULL value, which may trigger panic or warning
> in __submit_discard_cmd(), let's fix to check bio instread of return
> value after __blkdev_issue_discard().
It can only return blk_alloc_discard_bio if the the gfp_mask doesn't
allow sleeping (which isn't the case here), or nr_sect is zero,
which I hope is also not the case as __submit_discard_cmd would
run into various other problems. So no, I don't think this is
patch makes any sense.
next prev parent reply other threads:[~2025-11-26 6:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 6:14 [PATCH] f2fs: fix to check bio after __blkdev_issue_discard() Chao Yu
2025-11-26 6:41 ` Christoph Hellwig [this message]
2025-11-28 3:34 ` Chao Yu
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=aSahEs04brIrBcue@infradead.org \
--to=hch@infradead.org \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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