diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:03:07 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:03:07 +0800 |
commit | 1c563c0006661025d7a6c9bc85fc889a4e8a1c06 (patch) | |
tree | 93d455583031d0cacebfd436d5b2118a536de5f7 /fs/ext4/mballoc.c | |
parent | 71205f3b80da389c52cc2611f59e183a77c56f4f (diff) | |
parent | 28ec98bc2e4a175b60f45d505e715a33b93dd077 (diff) |
Merge tag 'v4.4.55' into linux-linaro-lsk-v4.4lsk-v4.4-17.03
This is the 4.4.55 stable release
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 b7a3957a9dca..84cd77663e1f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3120,6 +3120,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 */ |