mdadm/0009-Grow-remove-dead-condition-in-Grow_reshape.patch
Xiao Ni fbe794e269 Update to latest upstream
Update to 4.3 and backport other patches behind 4.3

Resolves: RHEL-30530

Signed-off-by: Xiao Ni <xni@redhat.com>
2024-03-29 17:30:23 +08:00

35 lines
986 B
Diff

From e44d13f466e30c018887cd5aaf1212ed9f510813 Mon Sep 17 00:00:00 2001
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
Date: Tue, 20 Feb 2024 11:56:10 +0100
Subject: [PATCH 09/41] Grow: remove dead condition in Grow_reshape()
Remove dead "if" condition from Grow_reshape(). Sysfs read check is
performed earlier in the code.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
Grow.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Grow.c b/Grow.c
index 5498e54f..c69a342d 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2098,11 +2098,7 @@ int Grow_reshape(char *devname, int fd,
/* got truncated to 32bit, write to
* component_size instead
*/
- if (sra)
- rv = sysfs_set_num(sra, NULL,
- "component_size", s->size);
- else
- rv = -1;
+ rv = sysfs_set_num(sra, NULL, "component_size", s->size);
} else {
rv = md_set_array_info(fd, &array);
--
2.40.1