]> err.no Git - linux-2.6/commitdiff
[PATCH] md: remove nuisance message at shutdown
authorNeilBrown <neilb@suse.de>
Mon, 26 Jun 2006 07:27:39 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:37 +0000 (09:58 -0700)
At shutdown, we switch all arrays to read-only, which creates a message for
every instantiated array, even those which aren't actually active.

So remove the message for non-active arrays.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c

index ad576ad2ca763b7c973c1b9ffae91f6fb6537c24..71d46eb2c43870b94b1080872028608f311e7624 100644 (file)
@@ -2911,7 +2911,7 @@ static int do_md_stop(mddev_t * mddev, int ro)
                if (disk)
                        set_capacity(disk, 0);
                mddev->changed = 1;
-       } else
+       } else if (mddev->pers)
                printk(KERN_INFO "md: %s switched to read-only mode.\n",
                        mdname(mddev));
        err = 0;