Commit 60a48ea1 authored by Guo Mengqi's avatar Guo Mengqi Committed by Jian Zhang
Browse files

sharepool: fix sp_alloc_populate no fallocate bug

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG


CVE: NA

--------------------------------

do_mm_populate() will try allocate physical pages from the start of
required range [start, end), and return error on the first allocation
failure without releasing the pages allocated before.
That means we must release the shared-file range after calling
do_mm_populate().

Remove need_fallocate, and always call sp_fallocate() on the error path
of sp_alloc_mmap_populate().

Signed-off-by: default avatarGuo Mengqi <guomengqi3@huawei.com>
parent 7086bdba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment