Skip to content

Commit 31e4fac

Browse files
Christoph Hellwigaxboe
authored andcommitted
mtd_blkdevs: use the default discard granularity
The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Richard Weinberger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 105c1a5 commit 31e4fac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/mtd/mtd_blkdevs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
376376
blk_queue_flag_set(QUEUE_FLAG_NONROT, new->rq);
377377
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, new->rq);
378378

379-
if (tr->discard) {
379+
if (tr->discard)
380380
blk_queue_max_discard_sectors(new->rq, UINT_MAX);
381-
new->rq->limits.discard_granularity = tr->blksize;
382-
}
383381

384382
gd->queue = new->rq;
385383

0 commit comments

Comments
 (0)