ANDROID: Revert "block: Fix a deadlock related freezing zoned storage devices"

This reverts commit 49dd742eed.

Prepare for replacing this CL with a FROMGIT CL.

Bug: 415836627
Change-Id: I1d0153b4c6e39ac37a174ca87bf72f7e03948c7b
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche
2025-06-12 09:51:21 -07:00
parent 9538ac3daa
commit b1605a0473

View File

@@ -621,13 +621,6 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
return BLK_STS_OK;
}
/*
* Do not call bio_queue_enter() if the BIO_ZONE_WRITE_PLUGGING flag has been
* set because this causes blk_mq_freeze_queue() to deadlock if
* blk_zone_wplug_bio_work() submits a bio. Calling bio_queue_enter() for bios
* on the plug list is not necessary since a q_usage_counter reference is held
* while a bio is on the plug list.
*/
static void __submit_bio(struct bio *bio)
{
/* If plug is not used, add new plug here to cache nsecs time. */
@@ -640,12 +633,8 @@ static void __submit_bio(struct bio *bio)
if (!bdev_test_flag(bio->bi_bdev, BD_HAS_SUBMIT_BIO)) {
blk_mq_submit_bio(bio);
} else {
} else if (likely(bio_queue_enter(bio) == 0)) {
struct gendisk *disk = bio->bi_bdev->bd_disk;
bool zwp = bio_zone_write_plugging(bio);
if (unlikely(!zwp && bio_queue_enter(bio) != 0))
goto finish_plug;
if ((bio->bi_opf & REQ_POLLED) &&
!(disk->queue->limits.features & BLK_FEAT_POLL)) {
@@ -654,12 +643,9 @@ static void __submit_bio(struct bio *bio)
} else {
disk->fops->submit_bio(bio);
}
if (!zwp)
blk_queue_exit(disk->queue);
blk_queue_exit(disk->queue);
}
finish_plug:
blk_finish_plug(&plug);
}