]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble/Assemble: Get rid of last use of md_get_version()
authorJes Sorensen <Jes.Sorensen@gmail.com>
Wed, 5 Apr 2017 19:47:37 +0000 (15:47 -0400)
committerJes Sorensen <Jes.Sorensen@gmail.com>
Wed, 5 Apr 2017 19:47:37 +0000 (15:47 -0400)
At this point in the code, we know we have a valid array, and any
recent kernel will return 9003, so no point in querying the kernel for
this.

Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Assemble.c

index fa5fdbee125681eeb30ac25b2178ee15eeb04e96..0db428f07030cc33f3d7ba74d71d52be0c3ff25a 100644 (file)
@@ -1901,7 +1901,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
                    c->readonly &&
                    content->text_version[0] == '/')
                        content->text_version[0] = '-';
-               if (sysfs_set_array(content, md_get_version(mdfd)) != 0) {
+               if (sysfs_set_array(content, 9003) != 0) {
                        sysfs_free(sra);
                        return 1;
                }