diff mbox series

[4/6] ide: don't acquire queue lock in ide_pm_execute_rq

Message ID 20181116081006.5083-5-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/6] block: remove the rq_alloc_data request_queue field | expand

Commit Message

Christoph Hellwig Nov. 16, 2018, 8:10 a.m. UTC
There is nothing we can synchronize against over a call to
blk_queue_dying.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/ide/ide-pm.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Omar Sandoval Nov. 16, 2018, 8:34 a.m. UTC | #1
On Fri, Nov 16, 2018 at 09:10:04AM +0100, Christoph Hellwig wrote:
> There is nothing we can synchronize against over a call to
> blk_queue_dying.

Reviewed-by: Omar Sandoval <osandov@fb.com>

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/ide/ide-pm.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
> index 51fe10ac02fa..56690f523100 100644
> --- a/drivers/ide/ide-pm.c
> +++ b/drivers/ide/ide-pm.c
> @@ -44,15 +44,12 @@ static int ide_pm_execute_rq(struct request *rq)
>  {
>  	struct request_queue *q = rq->q;
>  
> -	spin_lock_irq(&q->queue_lock);
>  	if (unlikely(blk_queue_dying(q))) {
>  		rq->rq_flags |= RQF_QUIET;
>  		scsi_req(rq)->result = -ENXIO;
> -		spin_unlock_irq(&q->queue_lock);
>  		blk_mq_end_request(rq, BLK_STS_OK);
>  		return -ENXIO;
>  	}
> -	spin_unlock_irq(&q->queue_lock);
>  	blk_execute_rq(q, NULL, rq, true);
>  
>  	return scsi_req(rq)->result ? -EIO : 0;
> -- 
> 2.19.1
>
diff mbox series

Patch

diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
index 51fe10ac02fa..56690f523100 100644
--- a/drivers/ide/ide-pm.c
+++ b/drivers/ide/ide-pm.c
@@ -44,15 +44,12 @@  static int ide_pm_execute_rq(struct request *rq)
 {
 	struct request_queue *q = rq->q;
 
-	spin_lock_irq(&q->queue_lock);
 	if (unlikely(blk_queue_dying(q))) {
 		rq->rq_flags |= RQF_QUIET;
 		scsi_req(rq)->result = -ENXIO;
-		spin_unlock_irq(&q->queue_lock);
 		blk_mq_end_request(rq, BLK_STS_OK);
 		return -ENXIO;
 	}
-	spin_unlock_irq(&q->queue_lock);
 	blk_execute_rq(q, NULL, rq, true);
 
 	return scsi_req(rq)->result ? -EIO : 0;