diff options
-rw-r--r-- | drivers/md/md.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 06dee51456e8..653d4dcbee23 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2689,14 +2689,6 @@ static int do_md_stop(mddev_t * mddev, int ro) | |||
2689 | set_disk_ro(disk, 1); | 2689 | set_disk_ro(disk, 1); |
2690 | } | 2690 | } |
2691 | 2691 | ||
2692 | bitmap_destroy(mddev); | ||
2693 | if (mddev->bitmap_file) { | ||
2694 | atomic_set(&mddev->bitmap_file->f_dentry->d_inode->i_writecount, 1); | ||
2695 | fput(mddev->bitmap_file); | ||
2696 | mddev->bitmap_file = NULL; | ||
2697 | } | ||
2698 | mddev->bitmap_offset = 0; | ||
2699 | |||
2700 | /* | 2692 | /* |
2701 | * Free resources if final stop | 2693 | * Free resources if final stop |
2702 | */ | 2694 | */ |
@@ -2706,6 +2698,14 @@ static int do_md_stop(mddev_t * mddev, int ro) | |||
2706 | struct gendisk *disk; | 2698 | struct gendisk *disk; |
2707 | printk(KERN_INFO "md: %s stopped.\n", mdname(mddev)); | 2699 | printk(KERN_INFO "md: %s stopped.\n", mdname(mddev)); |
2708 | 2700 | ||
2701 | bitmap_destroy(mddev); | ||
2702 | if (mddev->bitmap_file) { | ||
2703 | atomic_set(&mddev->bitmap_file->f_dentry->d_inode->i_writecount, 1); | ||
2704 | fput(mddev->bitmap_file); | ||
2705 | mddev->bitmap_file = NULL; | ||
2706 | } | ||
2707 | mddev->bitmap_offset = 0; | ||
2708 | |||
2709 | ITERATE_RDEV(mddev,rdev,tmp) | 2709 | ITERATE_RDEV(mddev,rdev,tmp) |
2710 | if (rdev->raid_disk >= 0) { | 2710 | if (rdev->raid_disk >= 0) { |
2711 | char nm[20]; | 2711 | char nm[20]; |