diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-02 09:28:32 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-02 09:28:32 +0300 |
| commit | 714c95ce8bad7a2042006fc9a2079fcd469b6a03 (patch) | |
| tree | cdf9f5a6fcbb389f555584ef64ee911eefeb1777 /include/linux/blkdev.h | |
| parent | aaf3f4e925dc2bdc4715142103660285632a245c (diff) | |
| parent | 021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff) | |
| download | linux-714c95ce8bad7a2042006fc9a2079fcd469b6a03.tar.xz | |
Merge 4.18-rc3 into usb-next
We want the USB and other fixes in here as well to make merges and
testing easier.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9154570edf29..79226ca8f80f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1119,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q, if (!q->limits.chunk_sectors) return q->limits.max_sectors; - return q->limits.chunk_sectors - - (offset & (q->limits.chunk_sectors - 1)); + return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors - + (offset & (q->limits.chunk_sectors - 1)))); } static inline unsigned int blk_rq_get_max_sectors(struct request *rq, |
