nvme_config_discard currently skips updating the discard limits if they were set before because blk_queue_max_discard_sectors used to update the configurable max_discard_sectors limit unconditionally. Now that this has been fixed we can update the discard limits even if they were set to deal with the case of a reset changing the limits after e.g. a firmware update. Fixes: 3831761eb859 ("nvme: only reconfigure discard if necessary") Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/nvme/host/core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 47d7ba2827ff29..2d6c1f4ad7f5c8 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1734,10 +1734,6 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) queue->limits.discard_granularity = size; - /* If discard is already enabled, don't reset queue limits */ - if (queue->limits.max_discard_sectors) - return; - blk_queue_max_discard_sectors(queue, ctrl->max_discard_sectors); blk_queue_max_discard_segments(queue, ctrl->max_discard_segments); -- 2.39.2