]> www.infradead.org Git - nvme.git/commitdiff
block: fix the blk_queue_nonrot polarity
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jun 2024 17:38:35 +0000 (19:38 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Jun 2024 19:06:12 +0000 (13:06 -0600)
Take care of the inverse polarity of the BLK_FEAT_ROTATIONAL flag
vs the old nonrot helper.

Fixes: bd4a633b6f7c ("block: move the nonrot flag to queue_limits")
Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240624173835.76753-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h

index e89003360c17c7d1ac765bef5337a234fbcb85b3..b2f1362c46814f2612818ab1ac4b94e660226287 100644 (file)
@@ -617,7 +617,7 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
 #define blk_queue_nomerges(q)  test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
 #define blk_queue_noxmerges(q) \
        test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags)
-#define blk_queue_nonrot(q)    ((q)->limits.features & BLK_FEAT_ROTATIONAL)
+#define blk_queue_nonrot(q)    (!((q)->limits.features & BLK_FEAT_ROTATIONAL))
 #define blk_queue_io_stat(q)   ((q)->limits.features & BLK_FEAT_IO_STAT)
 #define blk_queue_zone_resetall(q)     \
        ((q)->limits.features & BLK_FEAT_ZONE_RESETALL)