Skip to content

Commit

Permalink
block: blk_max_size_offset() should check ->max_sectors
Browse files Browse the repository at this point in the history
Commit 762380a 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>
  • Loading branch information
Jens Axboe committed Jun 18, 2014
1 parent d891fa7 commit 736ed4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 736ed4d

Please sign in to comment.