]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Tidy up some handling of sb_dirty in md.c
authorNeil Brown <neilb@cse.unsw.edu.au>
Thu, 21 Nov 2002 06:43:58 +0000 (22:43 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 21 Nov 2002 06:43:58 +0000 (22:43 -0800)
when do_md_run fails mddev->pers is not set, so
do_md_stop will not try to write out the superblock
so there is no need to set sb_dirty to 0.

drivers/md/md.c

index 3c24302d1125f02db58611d2488ac490c341ee11..b625231521e8b5d7457ac4a7792e78e2372d5498 100644 (file)
@@ -1621,10 +1621,6 @@ static void autorun_array(mddev_t *mddev)
        err = do_md_run (mddev);
        if (err) {
                printk(KERN_WARNING "md :do_md_run() returned %d\n", err);
-               /*
-                * prevent the writeback of an unrunnable array
-                */
-               mddev->sb_dirty = 0;
                do_md_stop (mddev, 0);
        }
 }
@@ -2354,11 +2350,11 @@ static int md_ioctl(struct inode *inode, struct file *file,
                         * we have to clean up the mess if
                         * the array cannot be run for some
                         * reason ...
+                        * ->pers will not be set, to superblock will
+                        * not be updated.
                         */
-                       if (err) {
-                               mddev->sb_dirty = 0;
+                       if (err)
                                do_md_stop (mddev, 0);
-                       }
                        goto done_unlock;
                }