[ 11/82] md: raid0: fix error return from create_stripe_zones.
From: Ben Hutchings
Date: Mon Mar 18 2013 - 00:40:08 EST
3.2-stable review patch. If anyone has any objections, please let me know.
From: NeilBrown <neilb@xxxxxxx>
commit 58ebb34c49fcfcaa029e4b1c1453d92583900f9a upstream.
Create_stripe_zones returns an error slightly differently to
raid0_run and to raid0_takeover_*.
The error returned used by the second was wrong and an error would
result in mddev->private being set to NULL and sooner or later a
So never return NULL, return ERR_PTR(err), not NULL from
This bug has been present since 2.6.35 so the fix is suitable
for any kernel since then.
Signed-off-by: NeilBrown <neilb@xxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
drivers/md/raid0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -286,7 +286,7 @@ abort:
- *private_conf = NULL;
+ *private_conf = ERR_PTR(err);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/