diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 4dfa15da9cb8..9233c71138f1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5121,6 +5121,7 @@ static int md_set_readonly(struct mddev *mddev, struct block_device *bdev) | |||
5121 | printk("md: %s still in use.\n",mdname(mddev)); | 5121 | printk("md: %s still in use.\n",mdname(mddev)); |
5122 | if (did_freeze) { | 5122 | if (did_freeze) { |
5123 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); | 5123 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); |
5124 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | ||
5124 | md_wakeup_thread(mddev->thread); | 5125 | md_wakeup_thread(mddev->thread); |
5125 | } | 5126 | } |
5126 | err = -EBUSY; | 5127 | err = -EBUSY; |
@@ -5135,6 +5136,8 @@ static int md_set_readonly(struct mddev *mddev, struct block_device *bdev) | |||
5135 | mddev->ro = 1; | 5136 | mddev->ro = 1; |
5136 | set_disk_ro(mddev->gendisk, 1); | 5137 | set_disk_ro(mddev->gendisk, 1); |
5137 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); | 5138 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); |
5139 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | ||
5140 | md_wakeup_thread(mddev->thread); | ||
5138 | sysfs_notify_dirent_safe(mddev->sysfs_state); | 5141 | sysfs_notify_dirent_safe(mddev->sysfs_state); |
5139 | err = 0; | 5142 | err = 0; |
5140 | } | 5143 | } |
@@ -5178,6 +5181,7 @@ static int do_md_stop(struct mddev *mddev, int mode, | |||
5178 | mutex_unlock(&mddev->open_mutex); | 5181 | mutex_unlock(&mddev->open_mutex); |
5179 | if (did_freeze) { | 5182 | if (did_freeze) { |
5180 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); | 5183 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); |
5184 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | ||
5181 | md_wakeup_thread(mddev->thread); | 5185 | md_wakeup_thread(mddev->thread); |
5182 | } | 5186 | } |
5183 | return -EBUSY; | 5187 | return -EBUSY; |