From: Krzysztof Wojcik Date: Wed, 20 Apr 2011 05:39:53 +0000 (+1000) Subject: md: Cleanup after raid45->raid0 takeover X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fee68723cf6ae00082f70f3eff17fceab2a4f7d7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git md: Cleanup after raid45->raid0 takeover Problem: After raid4->raid0 takeover operation, another takeover operation (e.g raid0->raid10) results "kernel oops". Root cause: Variables 'degraded' in mddev structure is not cleared on raid45->raid0 takeover. This patch reset this variable. Signed-off-by: Krzysztof Wojcik Signed-off-by: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 6e853c61d87e..7d6f7f18a920 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3170,6 +3170,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len) mddev->layout = mddev->new_layout; mddev->chunk_sectors = mddev->new_chunk_sectors; mddev->delta_disks = 0; + mddev->degraded = 0; if (mddev->pers->sync_request == NULL) { /* this is now an array without redundancy, so * it must always be in_sync