]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
IncrementalScan: Use md_array_active() instead of md_get_array_info()
authorJes Sorensen <jsorensen@fb.com>
Fri, 5 May 2017 16:18:29 +0000 (12:18 -0400)
committerJes Sorensen <jsorensen@fb.com>
Fri, 5 May 2017 16:18:29 +0000 (12:18 -0400)
This eliminates yet another case where GET_ARRAY_INFO was used to
indicate whether the array was active.

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Incremental.c

index b73eabd7f85babc7d71259ba774d3ef8a0a13f52..680d31858f98d12577731c50aece8dba0d970b23 100644 (file)
@@ -1317,7 +1317,6 @@ int IncrementalScan(struct context *c, char *devnm)
 
 restart:
        for (me = mapl ; me ; me = me->next) {
-               mdu_array_info_t array;
                struct mdinfo *sra;
                int mdfd;
 
@@ -1362,7 +1361,7 @@ restart:
                                rv = 1;
                        continue;
                }
-               if (md_get_array_info(mdfd, &array) == 0 || errno != ENODEV) {
+               if (md_array_active(mdfd)) {
                        close(mdfd);
                        continue;
                }