aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r--block/blk-settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index afa55e14e278..59fd05d9f1d5 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -319,9 +319,9 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
319 t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors); 319 t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
320 t->seg_boundary_mask = min_not_zero(t->seg_boundary_mask, b->seg_boundary_mask); 320 t->seg_boundary_mask = min_not_zero(t->seg_boundary_mask, b->seg_boundary_mask);
321 321
322 t->max_phys_segments = min(t->max_phys_segments, b->max_phys_segments); 322 t->max_phys_segments = min_not_zero(t->max_phys_segments, b->max_phys_segments);
323 t->max_hw_segments = min(t->max_hw_segments, b->max_hw_segments); 323 t->max_hw_segments = min_not_zero(t->max_hw_segments, b->max_hw_segments);
324 t->max_segment_size = min(t->max_segment_size, b->max_segment_size); 324 t->max_segment_size = min_not_zero(t->max_segment_size, b->max_segment_size);
325 t->hardsect_size = max(t->hardsect_size, b->hardsect_size); 325 t->hardsect_size = max(t->hardsect_size, b->hardsect_size);
326 if (!t->queue_lock) 326 if (!t->queue_lock)
327 WARN_ON_ONCE(1); 327 WARN_ON_ONCE(1);