summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-01-09 08:45:31 -0700
committerJens Axboe <axboe@kernel.dk>2018-01-09 08:45:31 -0700
commitaae95e81c2b9d0533cbc16ffeb4b41395ea23197 (patch)
tree7fbab3e83bde6070b1f9175efc7bbe862dcd01b8 /block
parent59711e4ea1e409e54791873b155df6aa99ad9253 (diff)
parent0d52af590552473666da5b6111e7182d6cd23f92 (diff)
Merge branch 'for-4.16/block' into for-next
Diffstat (limited to 'block')
-rw-r--r--block/bfq-cgroup.c7
-rw-r--r--block/bfq-iosched.c3
-rw-r--r--block/blk-mq.c3
3 files changed, 10 insertions, 3 deletions
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index da1525ec4c87..d819dc77fe65 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -775,10 +775,11 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)
unsigned long flags;
int i;
+ spin_lock_irqsave(&bfqd->lock, flags);
+
if (!entity) /* root group */
- return;
+ goto put_async_queues;
- spin_lock_irqsave(&bfqd->lock, flags);
/*
* Empty all service_trees belonging to this group before
* deactivating the group itself.
@@ -809,6 +810,8 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)
}
__bfq_deactivate_entity(entity, false);
+
+put_async_queues:
bfq_put_async_queues(bfqd, bfqg);
spin_unlock_irqrestore(&bfqd->lock, flags);
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 7bd789da7a29..7c0b7f60811c 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -4893,6 +4893,9 @@ static void bfq_exit_queue(struct elevator_queue *e)
hrtimer_cancel(&bfqd->idle_slice_timer);
+ /* release oom-queue reference to root group */
+ bfqg_and_blkg_put(bfqd->root_group);
+
#ifdef CONFIG_BFQ_GROUP_IOSCHED
blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq);
#else
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 111e1aa5562f..e258ad8dc171 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2015,7 +2015,8 @@ static void blk_mq_exit_hctx(struct request_queue *q,
{
blk_mq_debugfs_unregister_hctx(hctx);
- blk_mq_tag_idle(hctx);
+ if (blk_mq_hw_queue_mapped(hctx))
+ blk_mq_tag_idle(hctx);
if (set->ops->exit_request)
set->ops->exit_request(set, hctx->fq->flush_rq, hctx_idx);