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

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

Merge "mmc: card: Call blk_requeue_request() with queue-lock held"

parents c7706b33 55fe6b0e
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -3196,11 +3196,11 @@ static struct mmc_cmdq_req *mmc_blk_cmdq_rw_prep(
static void mmc_blk_cmdq_requeue_rw_rq(struct mmc_queue *mq,
				struct request *req)
{
	struct mmc_card *card = mq->card;
	struct mmc_host *host = card->host;
	struct request_queue *q = req->q;

	blk_requeue_request(req->q, req);
	mmc_put_card(host->card);
	spin_lock_irq(q->queue_lock);
	blk_requeue_request(q, req);
	spin_unlock_irq(q->queue_lock);
}

static int mmc_blk_cmdq_issue_rw_rq(struct mmc_queue *mq, struct request *req)
@@ -4090,9 +4090,16 @@ static int mmc_blk_cmdq_issue_rq(struct mmc_queue *mq, struct request *req)
			 * If issuing of the request fails with eitehr EBUSY or
			 * EAGAIN error, re-queue the request.
			 * This case would occur with ICE calls.
			 * For request which gets completed successfully or
			 * errored out, we release host lock in completion or
			 * error handling softirq context. But here the request
			 * is neither completed nor erred-out, so release the
			 * host lock explicitly.
			 */
			if (ret == -EBUSY || ret == -EAGAIN)
			if (ret == -EBUSY || ret == -EAGAIN) {
				mmc_blk_cmdq_requeue_rw_rq(mq, req);
				mmc_put_card(host->card);
			}
		}
	}