diff --git a/drivers/md/md.c b/drivers/md/md.c
index 43cf9cc9c1df3650c228ce01920645fb474f105a..bdd9bba577b076addf1c1c9e880fd8c4498aac1b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7069,7 +7069,7 @@ void md_check_recovery(mddev_t *mddev)
 	if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
 		return;
 	if ( ! (
-		(mddev->flags && !mddev->external) ||
+		(mddev->flags & ~ (1<<MD_CHANGE_PENDING)) ||
 		test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) ||
 		test_bit(MD_RECOVERY_DONE, &mddev->recovery) ||
 		(mddev->external == 0 && mddev->safemode == 1) ||