From: Yu Watanabe Date: Fri, 18 Apr 2025 18:41:45 +0000 (+0900) Subject: repart: if partition already exists, required size may not be multiple of grain size X-Git-Tag: v256.17~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee9434f7022fdbb48a2f1466d9531da2a30c35cd;p=thirdparty%2Fsystemd.git repart: if partition already exists, required size may not be multiple of grain size See partition_min_size_with_padding(). Fixes #37178. (cherry picked from commit cb109e00c45c8e92b1020e6249aac4a212e7f72d) (cherry picked from commit 4e6d6d885d320c27deb63b8a5ae5b330c00a174c) --- diff --git a/src/partition/repart.c b/src/partition/repart.c index db54c7ed0c7..18656208dd2 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -943,7 +943,6 @@ static bool context_allocate_partitions(Context *context, uint64_t *ret_largest_ /* How much do we need to fit? */ required = partition_min_size_with_padding(context, p); - assert(required % context->grain_size == 0); for (size_t i = 0; i < context->n_free_areas; i++) { a = context->free_areas[i];