diff options
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r-- | block/blk-barrier.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 0d98054cdbd7..30022b4e2f63 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -388,10 +388,10 @@ int blkdev_issue_discard(struct block_device *bdev, | |||
388 | 388 | ||
389 | bio->bi_sector = sector; | 389 | bio->bi_sector = sector; |
390 | 390 | ||
391 | if (nr_sects > q->max_hw_sectors) { | 391 | if (nr_sects > queue_max_hw_sectors(q)) { |
392 | bio->bi_size = q->max_hw_sectors << 9; | 392 | bio->bi_size = queue_max_hw_sectors(q) << 9; |
393 | nr_sects -= q->max_hw_sectors; | 393 | nr_sects -= queue_max_hw_sectors(q); |
394 | sector += q->max_hw_sectors; | 394 | sector += queue_max_hw_sectors(q); |
395 | } else { | 395 | } else { |
396 | bio->bi_size = nr_sects << 9; | 396 | bio->bi_size = nr_sects << 9; |
397 | nr_sects = 0; | 397 | nr_sects = 0; |