Skip to content

Commit 4434887

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: fix the blk_queue_nonrot polarity
Take care of the inverse polarity of the BLK_FEAT_ROTATIONAL flag vs the old nonrot helper. Fixes: bd4a633 ("block: move the nonrot flag to queue_limits") Reported-by: kernel test robot <[email protected]> Reported-by: Keith Busch <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 876835b commit 4434887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/blkdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
617617
#define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
618618
#define blk_queue_noxmerges(q) \
619619
test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags)
620-
#define blk_queue_nonrot(q) ((q)->limits.features & BLK_FEAT_ROTATIONAL)
620+
#define blk_queue_nonrot(q) (!((q)->limits.features & BLK_FEAT_ROTATIONAL))
621621
#define blk_queue_io_stat(q) ((q)->limits.features & BLK_FEAT_IO_STAT)
622622
#define blk_queue_zone_resetall(q) \
623623
((q)->limits.features & BLK_FEAT_ZONE_RESETALL)

0 commit comments

Comments
 (0)