Skip to content

Commit 650c8ed

Browse files
committed
Merge tag 'block-5.16-2021-11-27' of git://git.kernel.dk/linux-block
Pull more block fixes from Jens Axboe: "Turns out that the flushing out of pending fixes before the Thanksgiving break didn't quite work out in terms of timing, so here's a followup set of fixes: - rq_qos_done() should be called regardless of whether or not we're the final put of the request, it's not related to the freeing of the state. This fixes an IO stall with wbt that a few users have reported, a regression in this release. - Only define zram_wb_devops if it's used, fixing a compilation warning for some compilers" * tag 'block-5.16-2021-11-27' of git://git.kernel.dk/linux-block: zram: only make zram_wb_devops for CONFIG_ZRAM_WRITEBACK block: call rq_qos_done() before ref check in batch completions
2 parents 9e9fbe4 + d422f40 commit 650c8ed

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

block/blk-mq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,13 +860,14 @@ void blk_mq_end_request_batch(struct io_comp_batch *iob)
860860
if (iob->need_ts)
861861
__blk_mq_end_request_acct(rq, now);
862862

863+
rq_qos_done(rq->q, rq);
864+
863865
WRITE_ONCE(rq->state, MQ_RQ_IDLE);
864866
if (!refcount_dec_and_test(&rq->ref))
865867
continue;
866868

867869
blk_crypto_free_request(rq);
868870
blk_pm_mark_last_busy(rq);
869-
rq_qos_done(rq->q, rq);
870871

871872
if (nr_tags == TAG_COMP_BATCH || cur_hctx != rq->mq_hctx) {
872873
if (cur_hctx)

drivers/block/zram/zram_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,12 +1853,14 @@ static const struct block_device_operations zram_devops = {
18531853
.owner = THIS_MODULE
18541854
};
18551855

1856+
#ifdef CONFIG_ZRAM_WRITEBACK
18561857
static const struct block_device_operations zram_wb_devops = {
18571858
.open = zram_open,
18581859
.submit_bio = zram_submit_bio,
18591860
.swap_slot_free_notify = zram_slot_free_notify,
18601861
.owner = THIS_MODULE
18611862
};
1863+
#endif
18621864

18631865
static DEVICE_ATTR_WO(compact);
18641866
static DEVICE_ATTR_RW(disksize);

0 commit comments

Comments
 (0)