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

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

Merge "block: don't allow nr_pending to go negative"

parents 6604e7c5 1cf0ebea
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1329,9 +1329,11 @@ EXPORT_SYMBOL_GPL(part_round_stats);
#ifdef CONFIG_PM_RUNTIME
static void blk_pm_put_request(struct request *rq)
{
	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && rq->q->nr_pending) {
		if (!--rq->q->nr_pending)
			pm_runtime_mark_last_busy(rq->q->dev);
	}
}
#else
static inline void blk_pm_put_request(struct request *rq) {}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ void elv_bio_merged(struct request_queue *q, struct request *rq,
#ifdef CONFIG_PM_RUNTIME
static void blk_pm_requeue_request(struct request *rq)
{
	if (rq->q->dev && !(rq->cmd_flags & REQ_PM))
	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && rq->q->nr_pending)
		rq->q->nr_pending--;
}