summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtd_blkdevs.c
diff options
context:
space:
mode:
authorJens Axboe2015-07-14 16:15:12 +0200
committerJens Axboe2015-07-17 16:41:53 +0200
commit2bb4cd5cc472b191a46938becb7dafdd44644329 (patch)
tree8fabaacb2c5aebf2cc7b18dc59898a234985dbbd /drivers/mtd/mtd_blkdevs.c
parentblock: partition: convert percpu ref (diff)
downloadkernel-qcow2-linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.gz
kernel-qcow2-linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.xz
kernel-qcow2-linux-2bb4cd5cc472b191a46938becb7dafdd44644329.zip
block: have drivers use blk_queue_max_discard_sectors()
Some drivers use it now, others just set the limits field manually. But in preparation for splitting this into a hard and soft limit, ensure that they all call the proper function for setting the hw limit for discards. Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r--drivers/mtd/mtd_blkdevs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 41acc507b22e..1b96cf771d2b 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -423,7 +423,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
if (tr->discard) {
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
- new->rq->limits.max_discard_sectors = UINT_MAX;
+ blk_queue_max_discard_sectors(new->rq, UINT_MAX);
}
gd->queue = new->rq;