From: Jens Axboe Date: Wed, 18 Jun 2014 05:09:29 +0000 (-0700) Subject: block: blk_max_size_offset() should check ->max_sectors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=736ed4de766d4f0e8e6142dd4f9d73ef61835ed9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block: blk_max_size_offset() should check ->max_sectors Commit 762380ad9322 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 --- diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 31e11051f1ba..713f8b62b435 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -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));