From 573275b58ee9e1d2ec89f9608060f58931c3cde3 Mon Sep 17 00:00:00 2001 From: Tomasz Majchrzak Date: Thu, 30 Jun 2016 10:47:09 +0200 Subject: [PATCH] md: add missing sysfs_notify on array_state update Changeset 6791875e2e53 has added early return from a function so there is no sysfs notification for 'active' and 'clean' state change. Signed-off-by: Tomasz Majchrzak Signed-off-by: Shaohua Li --- drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/md.c b/drivers/md/md.c index 29297e97cdea..f77cad854044 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3938,6 +3938,8 @@ array_state_store(struct mddev *mddev, const char *buf, size_t len) } else err = -EBUSY; } + if (!err) + sysfs_notify_dirent_safe(mddev->sysfs_state); spin_unlock(&mddev->lock); return err ?: len; }