From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <ming.lei@redhat.com>, <damien.lemoal@wdc.com>,
<jiangguoqing@kylinos.cn>, <shinichiro.kawasaki@wdc.com>,
Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 4/4] blk-lib: don't check bdev_get_queue() NULL check
Date: Mon, 14 Feb 2022 02:08:59 -0800 [thread overview]
Message-ID: <20220214100859.9400-5-kch@nvidia.com> (raw)
In-Reply-To: <20220214100859.9400-1-kch@nvidia.com>
The queue variable is only used to check if it is NULL or not in
__blkdev_issue_zero_pages(). The return value of the bdev_get_queue()
will not be NULL based on the comment in the bdev_get_queue().
Remove the variable and respective NULL check.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
block/blk-lib.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index e7a9ed8cc5df..e6e854936ef6 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -294,14 +294,10 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev,
sector_t sector, sector_t nr_sects, gfp_t gfp_mask,
struct bio **biop)
{
- struct request_queue *q = bdev_get_queue(bdev);
struct bio *bio = *biop;
int bi_size = 0;
unsigned int sz;
- if (!q)
- return -ENXIO;
-
if (bdev_read_only(bdev))
return -EPERM;
--
2.29.0
next prev parent reply other threads:[~2022-02-14 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 10:08 [PATCH 0/4] blk-lib: cleanup bdev_get_queue() Chaitanya Kulkarni
2022-02-14 10:08 ` [PATCH 1/4] blk-lib: don't check bdev_get_queue() NULL check Chaitanya Kulkarni
2022-02-14 10:08 ` [PATCH 2/4] " Chaitanya Kulkarni
2022-02-14 10:08 ` [PATCH 3/4] " Chaitanya Kulkarni
2022-02-14 10:08 ` Chaitanya Kulkarni [this message]
2022-02-14 10:19 ` [PATCH 0/4] blk-lib: cleanup bdev_get_queue() Chaitanya Kulkarni
2022-02-14 13:45 ` 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=20220214100859.9400-5-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=jiangguoqing@kylinos.cn \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=shinichiro.kawasaki@wdc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.