diff options
-rw-r--r-- | drivers/md/md.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 5614500092e3..d18805fea111 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1975,17 +1975,14 @@ repeat: | |||
1975 | /* otherwise we have to go forward and ... */ | 1975 | /* otherwise we have to go forward and ... */ |
1976 | mddev->events ++; | 1976 | mddev->events ++; |
1977 | if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ | 1977 | if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ |
1978 | /* .. if the array isn't clean, insist on an odd 'events' */ | 1978 | /* .. if the array isn't clean, an 'even' event must also go |
1979 | if ((mddev->events&1)==0) { | 1979 | * to spares. */ |
1980 | mddev->events++; | 1980 | if ((mddev->events&1)==0) |
1981 | nospares = 0; | 1981 | nospares = 0; |
1982 | } | ||
1983 | } else { | 1982 | } else { |
1984 | /* otherwise insist on an even 'events' (for clean states) */ | 1983 | /* otherwise an 'odd' event must go to spares */ |
1985 | if ((mddev->events&1)) { | 1984 | if ((mddev->events&1)) |
1986 | mddev->events++; | ||
1987 | nospares = 0; | 1985 | nospares = 0; |
1988 | } | ||
1989 | } | 1986 | } |
1990 | } | 1987 | } |
1991 | 1988 | ||