You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
924 B
30 lines
924 B
From ec72668a9768ad01b409b68f31f3ca7ffeeaab4e Mon Sep 17 00:00:00 2001
|
|
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
|
Date: Tue, 16 Jul 2024 15:37:34 +0200
|
|
Subject: [PATCH 121/157] Manage: fix is_remove_safe()
|
|
|
|
Fix for to make --set-faulty working.
|
|
|
|
Fixes: 1b4b73fd535a ("mdadm: Manage.c fix coverity issues")
|
|
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
|
---
|
|
Manage.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Manage.c b/Manage.c
|
|
index aa5e80b2..f0304e1e 100644
|
|
--- a/Manage.c
|
|
+++ b/Manage.c
|
|
@@ -1333,7 +1333,7 @@ bool is_remove_safe(mdu_array_info_t *array, const int fd, char *devname, const
|
|
|
|
char *avail = xcalloc(array->raid_disks, sizeof(char));
|
|
|
|
- for (disk = mdi->devs; disk; disk = mdi->next) {
|
|
+ for (disk = mdi->devs; disk; disk = disk->next) {
|
|
if (disk->disk.raid_disk < 0)
|
|
continue;
|
|
if (!(disk->disk.state & (1 << MD_DISK_SYNC)))
|
|
--
|
|
2.41.0
|
|
|