aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 53bd46dba0cb..08c2d78e5737 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3314,6 +3314,10 @@ static int do_md_stop(mddev_t * mddev, int mode)
3314 3314
3315 module_put(mddev->pers->owner); 3315 module_put(mddev->pers->owner);
3316 mddev->pers = NULL; 3316 mddev->pers = NULL;
3317
3318 set_capacity(disk, 0);
3319 mddev->changed = 1;
3320
3317 if (mddev->ro) 3321 if (mddev->ro)
3318 mddev->ro = 0; 3322 mddev->ro = 0;
3319 } 3323 }
@@ -3333,7 +3337,7 @@ static int do_md_stop(mddev_t * mddev, int mode)
3333 if (mode == 0) { 3337 if (mode == 0) {
3334 mdk_rdev_t *rdev; 3338 mdk_rdev_t *rdev;
3335 struct list_head *tmp; 3339 struct list_head *tmp;
3336 struct gendisk *disk; 3340
3337 printk(KERN_INFO "md: %s stopped.\n", mdname(mddev)); 3341 printk(KERN_INFO "md: %s stopped.\n", mdname(mddev));
3338 3342
3339 bitmap_destroy(mddev); 3343 bitmap_destroy(mddev);
@@ -3358,10 +3362,6 @@ static int do_md_stop(mddev_t * mddev, int mode)
3358 mddev->raid_disks = 0; 3362 mddev->raid_disks = 0;
3359 mddev->recovery_cp = 0; 3363 mddev->recovery_cp = 0;
3360 3364
3361 disk = mddev->gendisk;
3362 if (disk)
3363 set_capacity(disk, 0);
3364 mddev->changed = 1;
3365 } else if (mddev->pers) 3365 } else if (mddev->pers)
3366 printk(KERN_INFO "md: %s switched to read-only mode.\n", 3366 printk(KERN_INFO "md: %s switched to read-only mode.\n",
3367 mdname(mddev)); 3367 mdname(mddev));