summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-08-12 06:34:45 +0300
committerShaohua Li <shli@fb.com>2017-08-12 06:42:06 +0300
commitafc1f55ca44e257f69da8f43e0714a76686ae8d1 (patch)
tree6db36809235796c74f28061ff7690e49ea44530f /drivers/md/md.c
parenta9501d742127e613d744e29814e9532bacb147e8 (diff)
downloadlinux-afc1f55ca44e257f69da8f43e0714a76686ae8d1.tar.xz
MD: not clear ->safemode for external metadata array
->safemode should be triggered by mdadm for external metadaa array, otherwise array's state confuses mdadm. Fixes: 33182d15c6bf(md: always clear ->safemode when md_check_recovery gets the mddev lock.) Cc: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e4ba95f6cd59..b01e458d31e9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8656,7 +8656,7 @@ void md_check_recovery(struct mddev *mddev)
if (mddev_trylock(mddev)) {
int spares = 0;
- if (mddev->safemode == 1)
+ if (!mddev->external && mddev->safemode == 1)
mddev->safemode = 0;
if (mddev->ro) {