diff --git a/[refs] b/[refs] index dc72c53a3627..27f74952b863 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c8c00a6915a2e3d10416e8bdd3138429beb96210 +refs/heads/master: 51d5668cb2e3fd1827a55184e48606fff054c5be diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index 5614500092e3..d18805fea111 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -1975,17 +1975,14 @@ static void md_update_sb(mddev_t * mddev, int force_change) /* otherwise we have to go forward and ... */ mddev->events ++; if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ - /* .. if the array isn't clean, insist on an odd 'events' */ - if ((mddev->events&1)==0) { - mddev->events++; + /* .. if the array isn't clean, an 'even' event must also go + * to spares. */ + if ((mddev->events&1)==0) nospares = 0; - } } else { - /* otherwise insist on an even 'events' (for clean states) */ - if ((mddev->events&1)) { - mddev->events++; + /* otherwise an 'odd' event must go to spares */ + if ((mddev->events&1)) nospares = 0; - } } }