[2/6] floppy: remove queue_lock around floppy_end_request
diff mbox series

Message ID 20181116081006.5083-3-hch@lst.de
State New
Headers show
Series
  • [1/6] block: remove the rq_alloc_data request_queue field
Related show

Commit Message

Christoph Hellwig Nov. 16, 2018, 8:10 a.m. UTC
There is nothing the queue_lock could protect inside floppy_end_request,
so remove it.

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

Comments

Omar Sandoval Nov. 16, 2018, 8:33 a.m. UTC | #1
On Fri, Nov 16, 2018 at 09:10:02AM +0100, Christoph Hellwig wrote:
> There is nothing the queue_lock could protect inside floppy_end_request,
> so remove it.

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

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/block/floppy.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index eeb4be8d000b..218099dd8e44 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -2254,10 +2254,7 @@ static void request_done(int uptodate)
>  		if (block > _floppy->sect)
>  			DRS->maxtrack = 1;
>  
> -		/* unlock chained buffers */
> -		spin_lock_irqsave(&q->queue_lock, flags);
>  		floppy_end_request(req, 0);
> -		spin_unlock_irqrestore(&q->queue_lock, flags);
>  	} else {
>  		if (rq_data_dir(req) == WRITE) {
>  			/* record write error information */
> @@ -2269,9 +2266,7 @@ static void request_done(int uptodate)
>  			DRWE->last_error_sector = blk_rq_pos(req);
>  			DRWE->last_error_generation = DRS->generation;
>  		}
> -		spin_lock_irqsave(&q->queue_lock, flags);
>  		floppy_end_request(req, BLK_STS_IOERR);
> -		spin_unlock_irqrestore(&q->queue_lock, flags);
>  	}
>  }
>  
> -- 
> 2.19.1
>

Patch
diff mbox series

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index eeb4be8d000b..218099dd8e44 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -2254,10 +2254,7 @@  static void request_done(int uptodate)
 		if (block > _floppy->sect)
 			DRS->maxtrack = 1;
 
-		/* unlock chained buffers */
-		spin_lock_irqsave(&q->queue_lock, flags);
 		floppy_end_request(req, 0);
-		spin_unlock_irqrestore(&q->queue_lock, flags);
 	} else {
 		if (rq_data_dir(req) == WRITE) {
 			/* record write error information */
@@ -2269,9 +2266,7 @@  static void request_done(int uptodate)
 			DRWE->last_error_sector = blk_rq_pos(req);
 			DRWE->last_error_generation = DRS->generation;
 		}
-		spin_lock_irqsave(&q->queue_lock, flags);
 		floppy_end_request(req, BLK_STS_IOERR);
-		spin_unlock_irqrestore(&q->queue_lock, flags);
 	}
 }