ddf: use correct loop variable in activate_spare
Using 'i' when you mean 'j' just shows how silly it is to use variables named 'i' and 'j'. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
77632af906
commit
e5cc7d469f
|
@ -3619,13 +3619,14 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a,
|
||||||
esize = ex[j].start - pos;
|
esize = ex[j].start - pos;
|
||||||
if (esize >= a->info.component_size)
|
if (esize >= a->info.component_size)
|
||||||
break;
|
break;
|
||||||
pos = ex[i].start + ex[i].size;
|
pos = ex[j].start + ex[j].size;
|
||||||
i++;
|
j++;
|
||||||
} while (ex[i-1].size);
|
} while (ex[j-1].size);
|
||||||
|
|
||||||
free(ex);
|
free(ex);
|
||||||
if (esize < a->info.component_size) {
|
if (esize < a->info.component_size) {
|
||||||
dprintf("%x:%x has no room: %llu %llu\n", dl->major, dl->minor,
|
dprintf("%x:%x has no room: %llu %llu\n",
|
||||||
|
dl->major, dl->minor,
|
||||||
esize, a->info.component_size);
|
esize, a->info.component_size);
|
||||||
/* No room */
|
/* No room */
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue