md: add missing sysfs_notify on array_state update

Changeset 6791875e2e has added early return from a function so there is no
sysfs notification for 'active' and 'clean' state change.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
Tomasz Majchrzak 2016-06-30 10:47:09 +02:00 committed by Shaohua Li
parent 4cb9da7d9c
commit 573275b58e
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}