dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/Assemble-Assemble-Get-rid-of-last-use-of-md_get-vers.patch

2c1b57
From b6e60be6281a2a4ec326a72de114867797a42d7f Mon Sep 17 00:00:00 2001
2c1b57
From: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
Date: Wed, 5 Apr 2017 15:47:37 -0400
2c1b57
Subject: [RHEL7.5 PATCH 065/169] Assemble/Assemble: Get rid of last use of
2c1b57
 md_get_version()
2c1b57
2c1b57
At this point in the code, we know we have a valid array, and any
2c1b57
recent kernel will return 9003, so no point in querying the kernel for
2c1b57
this.
2c1b57
2c1b57
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
---
2c1b57
 Assemble.c | 2 +-
2c1b57
 1 file changed, 1 insertion(+), 1 deletion(-)
2c1b57
2c1b57
diff --git a/Assemble.c b/Assemble.c
2c1b57
index fa5fdbe..0db428f 100644
2c1b57
--- a/Assemble.c
2c1b57
+++ b/Assemble.c
2c1b57
@@ -1901,7 +1901,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
2c1b57
 		    c->readonly &&
2c1b57
 		    content->text_version[0] == '/')
2c1b57
 			content->text_version[0] = '-';
2c1b57
-		if (sysfs_set_array(content, md_get_version(mdfd)) != 0) {
2c1b57
+		if (sysfs_set_array(content, 9003) != 0) {
2c1b57
 			sysfs_free(sra);
2c1b57
 			return 1;
2c1b57
 		}
2c1b57
-- 
2c1b57
2.7.4
2c1b57