Manage: Manage_ro(): Use md_array_active()
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>
This commit is contained in:
parent
6921010d95
commit
80223cb4db
6
Manage.c
6
Manage.c
|
@ -40,7 +40,6 @@ int Manage_ro(char *devname, int fd, int readonly)
|
|||
* use RESTART_ARRAY_RW or STOP_ARRAY_RO
|
||||
*
|
||||
*/
|
||||
mdu_array_info_t array;
|
||||
struct mdinfo *mdi;
|
||||
int rv = 0;
|
||||
|
||||
|
@ -88,9 +87,8 @@ int Manage_ro(char *devname, int fd, int readonly)
|
|||
goto out;
|
||||
}
|
||||
|
||||
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);
|
||||
rv = 1;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue