diff options
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9ded80da2c16..ccaa9aecd593 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -903,7 +903,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) | |||
| 903 | if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) | 903 | if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) |
| 904 | return q->limits.max_hw_sectors; | 904 | return q->limits.max_hw_sectors; |
| 905 | 905 | ||
| 906 | if (!q->limits.chunk_sectors) | 906 | if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) |
| 907 | return blk_queue_get_max_sectors(q, rq->cmd_flags); | 907 | return blk_queue_get_max_sectors(q, rq->cmd_flags); |
| 908 | 908 | ||
| 909 | return min(blk_max_size_offset(q, blk_rq_pos(rq)), | 909 | return min(blk_max_size_offset(q, blk_rq_pos(rq)), |
