From: Jes Sorensen Date: Fri, 5 May 2017 16:18:29 +0000 (-0400) Subject: IncrementalScan: Use md_array_active() instead of md_get_array_info() X-Git-Tag: mdadm-4.1-rc1~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00e56fd9537e1f69583d8b0f60faf02026f24d1b;p=thirdparty%2Fmdadm.git IncrementalScan: Use md_array_active() instead of md_get_array_info() This eliminates yet another case where GET_ARRAY_INFO was used to indicate whether the array was active. Signed-off-by: Jes Sorensen --- diff --git a/Incremental.c b/Incremental.c index b73eabd7..680d3185 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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; }