Message ID | d035a59a30e8a39176b4e4a9a92ece3c76d21399.1519779182.git.osandov@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/blk-mq.c b/block/blk-mq.c index 357492712b0e..09a57d97ca7f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -984,9 +984,9 @@ static bool flush_busy_ctx(struct sbitmap *sb, unsigned int bitnr, void *data) struct blk_mq_hw_ctx *hctx = flush_data->hctx; struct blk_mq_ctx *ctx = hctx->ctxs[bitnr]; - sbitmap_clear_bit(sb, bitnr); spin_lock(&ctx->lock); list_splice_tail_init(&ctx->rq_list, flush_data->list); + sbitmap_clear_bit(sb, bitnr); spin_unlock(&ctx->lock); return true; }