summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-03-18 16:53:31 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-03-22 12:16:28 +0100
commitde23e12a39cfc94575e1173293fe9e15337ee999 (patch)
tree18d7eac48459bc52eb0821c02c63dcefaf76a1d2 /sysfs.c
parentmdadm: Fix native --detail --export (diff)
downloadmdadm-de23e12a39cfc94575e1173293fe9e15337ee999.tar.xz
mdadm-de23e12a39cfc94575e1173293fe9e15337ee999.zip
sysfs: remove vers parameter from sysfs_set_array
9003 was passed directly to sysfs_set_array() since md_get_version() always returned this value. md_get_version() was removed long ago. Remove dead version check from sysfs_set_array(). Remove "vers" argument and fix function calls. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysfs.c b/sysfs.c
index 230b842e..4ded1672 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -678,7 +678,7 @@ int sysfs_set_safemode(struct mdinfo *sra, unsigned long ms)
return sysfs_set_str(sra, NULL, "safe_mode_delay", delay);
}
-int sysfs_set_array(struct mdinfo *info, int vers)
+int sysfs_set_array(struct mdinfo *info)
{
int rv = 0;
char ver[100];
@@ -702,9 +702,7 @@ int sysfs_set_array(struct mdinfo *info, int vers)
if (strlen(buf) >= 9 && buf[9] == '-')
ver[9] = '-';
- if ((vers % 100) < 2 ||
- sysfs_set_str(info, NULL, "metadata_version",
- ver) < 0) {
+ if (sysfs_set_str(info, NULL, "metadata_version", ver) < 0) {
pr_err("This kernel does not support external metadata.\n");
return 1;
}