From 6ae70539d520aa919a224e612f957a678f784d16 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 13 Dec 2024 19:44:18 +0100 Subject: [PATCH] Revert "dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow" This reverts commit 3676f0afd739727ee3869472c14564d0b3208ecc. --- drivers/md/dm-unstripe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-unstripe.c b/drivers/md/dm-unstripe.c index e18106e99..e673dacf6 100755 --- a/drivers/md/dm-unstripe.c +++ b/drivers/md/dm-unstripe.c @@ -84,8 +84,8 @@ static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) } uc->physical_start = start; - uc->unstripe_offset = (sector_t)uc->unstripe * uc->chunk_size; - uc->unstripe_width = (sector_t)(uc->stripes - 1) * uc->chunk_size; + uc->unstripe_offset = uc->unstripe * uc->chunk_size; + uc->unstripe_width = (uc->stripes - 1) * uc->chunk_size; uc->chunk_shift = is_power_of_2(uc->chunk_size) ? fls(uc->chunk_size) - 1 : 0; tmp_len = ti->len;