One call less to md_get_array_info() for determining whether an array
is active or not.
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
* use RESTART_ARRAY_RW or STOP_ARRAY_RO
*
*/
* use RESTART_ARRAY_RW or STOP_ARRAY_RO
*
*/
- mdu_array_info_t array;
struct mdinfo *mdi;
int rv = 0;
struct mdinfo *mdi;
int rv = 0;
- if (md_get_array_info(fd, &array)) {
- pr_err("%s does not appear to be active.\n",
- devname);
+ if (!md_array_active(fd)) {
+ pr_err("%s does not appear to be active.\n", devname);