pktcdvd: remove queue_lock around blk_queue_max_hw_sectors
authorChristoph Hellwig <hch@lst.de>
Fri, 16 Nov 2018 08:10:03 +0000 (09:10 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 Nov 2018 16:16:59 +0000 (09:16 -0700)
blk_queue_max_hw_sectors can't do anything with queue_lock protection
so don't hold it.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c

index 4adf4c8..f5a7102 100644 (file)
@@ -2203,9 +2203,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write)
                 * Some CDRW drives can not handle writes larger than one packet,
                 * even if the size is a multiple of the packet size.
                 */
-               spin_lock_irq(&q->queue_lock);
                blk_queue_max_hw_sectors(q, pd->settings.size);
-               spin_unlock_irq(&q->queue_lock);
                set_bit(PACKET_WRITABLE, &pd->flags);
        } else {
                pkt_set_speed(pd, MAX_SPEED, MAX_SPEED);