Commit 736ed4de authored by Jens Axboe's avatar Jens Axboe

block: blk_max_size_offset() should check ->max_sectors

Commit 762380ad inadvertently changed a check for max_sectors
to max_hw_sectors. Revert that part, so we still compare against
max_sectors.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent d891fa70
...@@ -920,7 +920,7 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q, ...@@ -920,7 +920,7 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q,
sector_t offset) sector_t offset)
{ {
if (!q->limits.chunk_sectors) if (!q->limits.chunk_sectors)
return q->limits.max_hw_sectors; return q->limits.max_sectors;
return q->limits.chunk_sectors - return q->limits.chunk_sectors -
(offset & (q->limits.chunk_sectors - 1)); (offset & (q->limits.chunk_sectors - 1));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment