From: Damien Le Moal Date: Thu, 4 Jul 2024 13:45:25 +0000 (+0200) Subject: dm: Remove max_secure_erase_granularity X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9d45db03acf9cee4f83148c403d105b1a38a0f23;p=users%2Fdwmw2%2Flinux.git dm: Remove max_secure_erase_granularity The max_secure_erase_granularity boolean of struct dm_target is used in __process_abnormal_io() but never set by any target. Remove this field and the dead code using it. Signed-off-by: Damien Le Moal Signed-off-by: Mikulas Patocka --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index a63efa2a46aef..2abf2b6865ea7 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1658,8 +1658,6 @@ static blk_status_t __process_abnormal_io(struct clone_info *ci, case REQ_OP_SECURE_ERASE: num_bios = ti->num_secure_erase_bios; max_sectors = limits->max_secure_erase_sectors; - if (ti->max_secure_erase_granularity) - max_granularity = max_sectors; break; case REQ_OP_WRITE_ZEROES: num_bios = ti->num_write_zeroes_bios; diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 5b7e96653ec6e..4ba2e73993bd9 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -363,12 +363,6 @@ struct dm_target { */ bool max_discard_granularity:1; - /* - * Set if this target requires that secure_erases be split on - * 'max_secure_erase_sectors' boundaries. - */ - bool max_secure_erase_granularity:1; - /* * Set if we need to limit the number of in-flight bios when swapping. */