diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-28 07:55:45 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-12-29 08:44:12 -0700 |
commit | 31e4fac930814f2f92eb6ebac9c4d4e3b09f7aaf (patch) | |
tree | 34b182c86839ccfdbb29172eb3fc2628d4824990 /drivers | |
parent | 105c1a5f6ccef7f52f9e76664407ef96218272eb (diff) | |
download | linux-31e4fac930814f2f92eb6ebac9c4d4e3b09f7aaf.tar.gz linux-31e4fac930814f2f92eb6ebac9c4d4e3b09f7aaf.tar.bz2 linux-31e4fac930814f2f92eb6ebac9c4d4e3b09f7aaf.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index ff18636e0889..0da7b3384947 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -376,10 +376,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) blk_queue_flag_set(QUEUE_FLAG_NONROT, new->rq); blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, new->rq); - if (tr->discard) { + if (tr->discard) blk_queue_max_discard_sectors(new->rq, UINT_MAX); - new->rq->limits.discard_granularity = tr->blksize; - } gd->queue = new->rq; |