diff options
-rw-r--r-- | fs/ext4/mballoc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index a11ea4d6164c..39d30f12d98d 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -2105,7 +2105,11 @@ repeat: | |||
2105 | group = ac->ac_g_ex.fe_group; | 2105 | group = ac->ac_g_ex.fe_group; |
2106 | 2106 | ||
2107 | for (i = 0; i < ngroups; group++, i++) { | 2107 | for (i = 0; i < ngroups; group++, i++) { |
2108 | if (group == ngroups) | 2108 | /* |
2109 | * Artificially restricted ngroups for non-extent | ||
2110 | * files makes group > ngroups possible on first loop. | ||
2111 | */ | ||
2112 | if (group >= ngroups) | ||
2109 | group = 0; | 2113 | group = 0; |
2110 | 2114 | ||
2111 | /* This now checks without needing the buddy page */ | 2115 | /* This now checks without needing the buddy page */ |