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 <hch@lst.de> Acked-by: Richard Weinberger <richard@nod.at> Link: https://lore.kernel.org/r/20231228075545.362768-10-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 105c1a5 commit 31e4fac

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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)