diff mbox series

[4/4] blk-lib: don't check bdev_get_queue() NULL check

Message ID 20220214100859.9400-5-kch@nvidia.com (mailing list archive)
State New, archived
Headers show
Series [1/4] blk-lib: don't check bdev_get_queue() NULL check | expand

Commit Message

Chaitanya Kulkarni Feb. 14, 2022, 10:08 a.m. UTC
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 mbox series

Patch

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;