loop: don't update discard limits from loop_set_status
authorChristoph Hellwig <hch@lst.de>
Wed, 27 Dec 2023 08:20:20 +0000 (08:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Dec 2023 17:43:46 +0000 (10:43 -0700)
loop_set_status doesn't change anything relevant to the discard and
write_zeroes setting, so don't bother calling loop_config_discard.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231227082020.249427-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c

index 9f2d412..23bc8b0 100644 (file)
@@ -1303,8 +1303,6 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
                loop_set_size(lo, new_size);
        }
 
-       loop_config_discard(lo);
-
        /* update dio if lo_offset or transfer is changed */
        __loop_update_dio(lo, lo->use_dio);