35 lines
986 B
Diff
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
|
|
|