Skip to content

Commit 6456952

Browse files
committed
Merge tag 'block-6.4-2023-06-09' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: - Fix an issue with the hardware queue nr_active, causing it to become imbalanced (Tian) - Fix an issue with null_blk not releasing pages if configured as memory backed (Nitesh) - Fix a locking issue in dasd (Jan) * tag 'block-6.4-2023-06-09' of git://git.kernel.dk/linux: s390/dasd: Use correct lock while counting channel queue length null_blk: Fix: memory release when memory_backed=1 blk-mq: fix blk_mq_hw_ctx active request accounting
2 parents dbfa18c + ccc45cb commit 6456952

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

block/blk-mq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,10 @@ static void __blk_mq_free_request(struct request *rq)
683683
blk_crypto_free_request(rq);
684684
blk_pm_mark_last_busy(rq);
685685
rq->mq_hctx = NULL;
686+
687+
if (rq->rq_flags & RQF_MQ_INFLIGHT)
688+
__blk_mq_dec_active_requests(hctx);
689+
686690
if (rq->tag != BLK_MQ_NO_TAG)
687691
blk_mq_put_tag(hctx->tags, ctx, rq->tag);
688692
if (sched_tag != BLK_MQ_NO_TAG)
@@ -694,15 +698,11 @@ static void __blk_mq_free_request(struct request *rq)
694698
void blk_mq_free_request(struct request *rq)
695699
{
696700
struct request_queue *q = rq->q;
697-
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
698701

699702
if ((rq->rq_flags & RQF_ELVPRIV) &&
700703
q->elevator->type->ops.finish_request)
701704
q->elevator->type->ops.finish_request(rq);
702705

703-
if (rq->rq_flags & RQF_MQ_INFLIGHT)
704-
__blk_mq_dec_active_requests(hctx);
705-
706706
if (unlikely(laptop_mode && !blk_rq_is_passthrough(rq)))
707707
laptop_io_completion(q->disk->bdi);
708708

drivers/block/null_blk/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,6 +2244,7 @@ static void null_destroy_dev(struct nullb *nullb)
22442244
struct nullb_device *dev = nullb->dev;
22452245

22462246
null_del_dev(nullb);
2247+
null_free_device_storage(dev, false);
22472248
null_free_dev(dev);
22482249
}
22492250

drivers/s390/block/dasd_ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ static int __dasd_ioctl_information(struct dasd_block *block,
552552

553553
memcpy(dasd_info->type, base->discipline->name, 4);
554554

555-
spin_lock_irqsave(&block->queue_lock, flags);
555+
spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags);
556556
list_for_each(l, &base->ccw_queue)
557557
dasd_info->chanq_len++;
558-
spin_unlock_irqrestore(&block->queue_lock, flags);
558+
spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags);
559559
return 0;
560560
}
561561

0 commit comments

Comments
 (0)