Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe3f71bc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "BACKPORT: blk-mq: fix is_flush_rq" into kernel.lnx.4.19.r3

parents 24f31ead 09de4ca5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -289,6 +289,11 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error)
		spin_unlock_irqrestore(&fq->mq_flush_lock, flags);
}

bool is_flush_rq(struct request *rq)
{
	return rq->end_io == flush_end_io;
}

/**
 * blk_kick_flush - consider issuing flush request
 * @q: request_queue being kicked
+1 −4
Original line number Diff line number Diff line
@@ -814,10 +814,7 @@ static bool blk_mq_req_expired(struct request *rq, unsigned long *next)

void blk_mq_put_rq_ref(struct request *rq)
{
	struct blk_mq_hw_ctx *hctx;

	hctx = blk_mq_map_queue(rq->q, rq->mq_ctx->cpu);
	if (is_flush_rq(rq, hctx))
	if (is_flush_rq(rq))
		rq->end_io(rq, 0);
	else if (refcount_dec_and_test(&rq->ref))
		__blk_mq_free_request(rq);
+1 −5
Original line number Diff line number Diff line
@@ -124,11 +124,7 @@ static inline void __blk_get_queue(struct request_queue *q)
	kobject_get(&q->kobj);
}

static inline bool
is_flush_rq(struct request *req, struct blk_mq_hw_ctx *hctx)
{
	return hctx->fq->flush_rq == req;
}
bool is_flush_rq(struct request *req);

struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
		int node, int cmd_size, gfp_t flags);