diff mbox series

[2/2,RESEND] mdadm: Remove dead code in imsm_fix_size_mismatch

Message ID 20220722064348.32136-3-lukasz.florczak@linux.intel.com (mailing list archive)
State Mainlined, archived
Headers show
Series mdadm: Fix array size mismatch after grow | expand

Commit Message

Lukasz Florczak July 22, 2022, 6:43 a.m. UTC
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>
---
 super-intel.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/super-intel.c b/super-intel.c
index 102689bc..cb5292e1 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -11772,10 +11772,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);