diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index cda786fa4341cfd9709cf66be7b259247396c11c..6bd667c34777fa11141ce3eac72f65cb724824d7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1407,7 +1407,10 @@ static inline unsigned int queue_max_segment_size(const struct request_queue *q) static inline unsigned int queue_max_zone_append_sectors(const struct request_queue *q) { - return q->limits.max_zone_append_sectors; + + const struct queue_limits *l = &q->limits; + + return min(l->max_zone_append_sectors, l->max_sectors); } static inline unsigned queue_logical_block_size(const struct request_queue *q)