Commit 787ba09c authored by Neil Brown's avatar Neil Brown Committed by James Bottomley

[PATCH] linear.c fix for gcc bug

From Andrew Morton <akpm@digeo.com>:

gcc-2.95.3 is getting an internal compiler error with CONFIG_LBD=y.  Reorganising
the code a bit made it go away.
parent d6eb9fa0
......@@ -110,9 +110,18 @@ static int linear_run (mddev_t *mddev)
goto out;
}
/*
* This code was restructured to work around a gcc-2.95.3 internal
* compiler error. Alter it with care.
*/
{
sector_t sz = md_size[mdidx(mddev)];
unsigned round = sector_div(sz, conf->smallest->size);
sector_t sz;
unsigned round;
unsigned long base;
sz = md_size[mdidx(mddev)];
base = conf->smallest->size;
round = sector_div(sz, base);
nb_zone = conf->nr_zones = sz + (round ? 1 : 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment