diff options
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 84acfe7d10e4..93b0da133507 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3788,6 +3788,8 @@ array_state_store(struct mddev *mddev, const char *buf, size_t len) | |||
3788 | if (err) | 3788 | if (err) |
3789 | return err; | 3789 | return err; |
3790 | else { | 3790 | else { |
3791 | if (mddev->hold_active == UNTIL_IOCTL) | ||
3792 | mddev->hold_active = 0; | ||
3791 | sysfs_notify_dirent_safe(mddev->sysfs_state); | 3793 | sysfs_notify_dirent_safe(mddev->sysfs_state); |
3792 | return len; | 3794 | return len; |
3793 | } | 3795 | } |
@@ -4508,8 +4510,6 @@ md_attr_store(struct kobject *kobj, struct attribute *attr, | |||
4508 | if (!capable(CAP_SYS_ADMIN)) | 4510 | if (!capable(CAP_SYS_ADMIN)) |
4509 | return -EACCES; | 4511 | return -EACCES; |
4510 | rv = mddev_lock(mddev); | 4512 | rv = mddev_lock(mddev); |
4511 | if (mddev->hold_active == UNTIL_IOCTL) | ||
4512 | mddev->hold_active = 0; | ||
4513 | if (!rv) { | 4513 | if (!rv) { |
4514 | rv = entry->store(mddev, page, length); | 4514 | rv = entry->store(mddev, page, length); |
4515 | mddev_unlock(mddev); | 4515 | mddev_unlock(mddev); |