If there is IO error in log device, don't export it like other raid disks. Otherwise we get kernel crash in different places since rdev->bdev, rdev->mddev becomes NULL Signed-off-by: Shaohua Li <shli@xxxxxx> --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index f1cbb08..0b1d7ef 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2519,7 +2519,7 @@ state_store(struct md_rdev *rdev, const char *buf, size_t len) else err = -EBUSY; } else if (cmd_match(buf, "remove")) { - if (rdev->raid_disk >= 0) + if (rdev->raid_disk >= 0 || test_bit(Journal, &rdev->flags)) err = -EBUSY; else { struct mddev *mddev = rdev->mddev; @@ -6040,7 +6040,7 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev) clear_bit(Blocked, &rdev->flags); remove_and_add_spares(mddev, rdev); - if (rdev->raid_disk >= 0) + if (rdev->raid_disk >= 0 || test_bit(Journal, &rdev->flags)) goto busy; if (mddev_is_clustered(mddev)) -- 2.4.6 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html