From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Cc: hch@infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH 3/4] brd: only preload radix tree if we're using a blocking gfp mask
Date: Thu, 16 Feb 2023 08:25:35 -0700 [thread overview]
Message-ID: <fe4d770a-69b3-95a5-ead0-f33c5762c67f@kernel.dk> (raw)
In-Reply-To: <20230216151918.319585-4-axboe@kernel.dk>
On 2/16/23 8:19?AM, Jens Axboe wrote:
> @@ -104,8 +105,10 @@ static int brd_insert_page(struct brd_device *brd, sector_t sector, gfp_t gfp)
> if (radix_tree_insert(&brd->brd_pages, idx, page)) {
> __free_page(page);
> page = radix_tree_lookup(&brd->brd_pages, idx);
> - BUG_ON(!page);
> - BUG_ON(page->index != idx);
> + if (!page)
> + ret = -ENOMEM;
> + else if (page->index != idx)
> + ret = -EIO;
> } else {
> brd->brd_nr_pages++;
> }
After sending this out, noticed that I forgot to change the return 0 to
return ret instead. This has been done locally, fwiw.
--
Jens Axboe
next prev parent reply other threads:[~2023-02-16 15:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 15:19 [PATCH 0/4] Support REQ_NWOAIT in brd Jens Axboe
2023-02-16 15:19 ` [PATCH 1/4] brd: return 0/-error from brd_insert_page() Jens Axboe
2023-02-16 16:05 ` Christoph Hellwig
2023-02-16 16:12 ` Jens Axboe
2023-02-16 16:14 ` Christoph Hellwig
2023-02-16 16:16 ` Jens Axboe
2023-02-17 11:50 ` Johannes Thumshirn
2023-02-16 15:19 ` [PATCH 2/4] brd: check for REQ_NOWAIT and set correct page allocation mask Jens Axboe
2023-02-16 16:06 ` Christoph Hellwig
2023-02-17 11:53 ` Johannes Thumshirn
2023-02-16 15:19 ` [PATCH 3/4] brd: only preload radix tree if we're using a blocking gfp mask Jens Axboe
2023-02-16 15:25 ` Jens Axboe [this message]
2023-02-16 16:07 ` Christoph Hellwig
2023-02-16 16:12 ` Jens Axboe
2023-02-16 19:09 ` kernel test robot
2023-02-16 15:19 ` [PATCH 4/4] brd: mark as nowait compatible Jens Axboe
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=fe4d770a-69b3-95a5-ead0-f33c5762c67f@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=stable@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