block: blk_max_size_offset() should check ->max_sectors
Commit 762380ad93
inadvertently changed a check for max_sectors
to max_hw_sectors. Revert that part, so we still compare against
max_sectors.
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Родитель
d891fa7087
Коммит
736ed4de76
|
@ -920,7 +920,7 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q,
|
|||
sector_t offset)
|
||||
{
|
||||
if (!q->limits.chunk_sectors)
|
||||
return q->limits.max_hw_sectors;
|
||||
return q->limits.max_sectors;
|
||||
|
||||
return q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1));
|
||||
|
|
Загрузка…
Ссылка в новой задаче