diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-05-31 12:02:46 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-05-31 12:02:46 +0800 |
commit | dc06d1ba220ca16ebbca598bb45242ec5e818cb2 (patch) | |
tree | ef66bd14901ec3a07cf65842a3b63884a64be529 /fs/ext4/mballoc.c | |
parent | 018ed21cf3b7cb618c63294793d63b23ce4afe24 (diff) | |
parent | a898540914d4136f29bc738ce593c1c501006f23 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-17.06-androidlsk-v4.1-17.05-androidlinux-linaro-lsk-v4.1-android
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 d681245212c9..a7fbde5ab2b2 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3097,6 +3097,13 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, if (ar->pright && start + size - 1 >= ar->lright) size -= start + size - ar->lright; + /* + * Trim allocation request for filesystems with artificially small + * groups. + */ + if (size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb)) + size = EXT4_BLOCKS_PER_GROUP(ac->ac_sb); + end = start + size; /* check we don't cross already preallocated blocks */ |