]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm: Remove dead code in imsm_fix_size_mismatch
authorLukasz Florczak <lukasz.florczak@linux.intel.com>
Fri, 22 Jul 2022 06:43:48 +0000 (08:43 +0200)
committerJes Sorensen <jsorensen@fb.com>
Thu, 28 Jul 2022 20:53:48 +0000 (16:53 -0400)
imsm_create_metadata_update_for_size_change() that returns u_size value
could return 0 in the past. As its behavior changed, and returned value
is always the size of imsm_update_size_change structure, check for
u_size is no longer needed.

Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super-intel.c

index 76b947f55c63e82ac74576152a0089989a826f01..4ddfcf94b750c2c1dee9ab8fe3356b852855e4be 100644 (file)
@@ -11869,10 +11869,6 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
                geo.size = d_size;
                u_size = imsm_create_metadata_update_for_size_change(st, &geo,
                                                                     &update);
-               if (u_size < 1) {
-                       dprintf("imsm: Cannot prepare size change update\n");
-                       goto exit;
-               }
                imsm_update_metadata_locally(st, update, u_size);
                if (st->update_tail) {
                        append_metadata_update(st, update, u_size);