Commit 8cdeea1a authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: Missing mddev_put in md resync code

Whenever a ITERATE_MDDEV loop is exitted abnormally
we need to mddev_put the current mddev.  There was
one point in md_do_sync where we didn't so use counts
became wrong.
parent bc7ae54e
......@@ -2920,8 +2920,10 @@ static void md_do_sync(void *data)
goto skip;
}
}
if (mddev->curr_resync == 1)
if (mddev->curr_resync == 1) {
mddev_put(mddev2);
break;
}
}
} while (mddev->curr_resync < 2);
......
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