diff mbox series

[1/2] block: get rid of unused plug->nowait flag

Message ID 20230808171310.112878-2-axboe@kernel.dk (mailing list archive)
State New, archived
Headers show
Series Block nowait fix | expand

Commit Message

Jens Axboe Aug. 8, 2023, 5:13 p.m. UTC
This was introduced to add a plug based way of signaling nowait issues,
but we have since moved on from that. Kill the old dead code, nobody is
setting it anymore.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 block/blk-core.c       | 6 ------
 include/linux/blkdev.h | 1 -
 2 files changed, 7 deletions(-)

Comments

Chaitanya Kulkarni Aug. 8, 2023, 7:39 p.m. UTC | #1
On 8/8/2023 10:13 AM, Jens Axboe wrote:
> This was introduced to add a plug based way of signaling nowait issues,
> but we have since moved on from that. Kill the old dead code, nobody is
> setting it anymore.
> 
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---

Looks good to me.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Bart Van Assche Aug. 8, 2023, 9:49 p.m. UTC | #2
On 8/8/23 10:13, Jens Axboe wrote:
> This was introduced to add a plug based way of signaling nowait issues,
> but we have since moved on from that. Kill the old dead code, nobody is
> setting it anymore.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/block/blk-core.c b/block/blk-core.c
index 90de50082146..9866468c72a2 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -722,14 +722,9 @@  void submit_bio_noacct(struct bio *bio)
 	struct block_device *bdev = bio->bi_bdev;
 	struct request_queue *q = bdev_get_queue(bdev);
 	blk_status_t status = BLK_STS_IOERR;
-	struct blk_plug *plug;
 
 	might_sleep();
 
-	plug = blk_mq_plug(bio);
-	if (plug && plug->nowait)
-		bio->bi_opf |= REQ_NOWAIT;
-
 	/*
 	 * For a REQ_NOWAIT based request, return -EOPNOTSUPP
 	 * if queue does not support NOWAIT.
@@ -1059,7 +1054,6 @@  void blk_start_plug_nr_ios(struct blk_plug *plug, unsigned short nr_ios)
 	plug->rq_count = 0;
 	plug->multiple_queues = false;
 	plug->has_elevator = false;
-	plug->nowait = false;
 	INIT_LIST_HEAD(&plug->cb_list);
 
 	/*
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ed44a997f629..87d94be7825a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -969,7 +969,6 @@  struct blk_plug {
 
 	bool multiple_queues;
 	bool has_elevator;
-	bool nowait;
 
 	struct list_head cb_list; /* md requires an unplug callback */
 };