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

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