Blame SOURCES/0028-mdadm-Remove-dead-code-in-imsm_fix_size_mismatch.patch

c0f891
From 751757620afb25a4c02746bf8368a7b5f22352ec Mon Sep 17 00:00:00 2001
c0f891
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
c0f891
Date: Fri, 22 Jul 2022 08:43:48 +0200
37f2b0
Subject: [PATCH 28/83] mdadm: Remove dead code in imsm_fix_size_mismatch
c0f891
c0f891
imsm_create_metadata_update_for_size_change() that returns u_size value
c0f891
could return 0 in the past. As its behavior changed, and returned value
c0f891
is always the size of imsm_update_size_change structure, check for
c0f891
u_size is no longer needed.
c0f891
c0f891
Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com>
c0f891
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
c0f891
---
c0f891
 super-intel.c | 4 ----
c0f891
 1 file changed, 4 deletions(-)
c0f891
c0f891
diff --git a/super-intel.c b/super-intel.c
c0f891
index 76b947f5..4ddfcf94 100644
c0f891
--- a/super-intel.c
c0f891
+++ b/super-intel.c
c0f891
@@ -11869,10 +11869,6 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
c0f891
 		geo.size = d_size;
c0f891
 		u_size = imsm_create_metadata_update_for_size_change(st, &geo,
c0f891
 								     &update);
c0f891
-		if (u_size < 1) {
c0f891
-			dprintf("imsm: Cannot prepare size change update\n");
c0f891
-			goto exit;
c0f891
-		}
c0f891
 		imsm_update_metadata_locally(st, update, u_size);
c0f891
 		if (st->update_tail) {
c0f891
 			append_metadata_update(st, update, u_size);
c0f891
-- 
37f2b0
2.38.1
c0f891