diff --git a/block/blk-settings.c b/block/blk-settings.c index 1b92e6624951..d501084bab4a 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -596,7 +596,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, } /* chunk_sectors a multiple of the physical block size? */ - if ((t->chunk_sectors << 9) & (t->physical_block_size - 1)) { + if (t->chunk_sectors % (t->physical_block_size >> SECTOR_SHIFT)) { t->chunk_sectors = 0; t->misaligned = 1; ret = -1;