diff options
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index be1227c196d8..c2810503eb50 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3121,6 +3121,13 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, | |||
3121 | if (ar->pright && start + size - 1 >= ar->lright) | 3121 | if (ar->pright && start + size - 1 >= ar->lright) |
3122 | size -= start + size - ar->lright; | 3122 | size -= start + size - ar->lright; |
3123 | 3123 | ||
3124 | /* | ||
3125 | * Trim allocation request for filesystems with artificially small | ||
3126 | * groups. | ||
3127 | */ | ||
3128 | if (size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb)) | ||
3129 | size = EXT4_BLOCKS_PER_GROUP(ac->ac_sb); | ||
3130 | |||
3124 | end = start + size; | 3131 | end = start + size; |
3125 | 3132 | ||
3126 | /* check we don't cross already preallocated blocks */ | 3133 | /* check we don't cross already preallocated blocks */ |