mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
UPSTREAM: erofs: avoid memory allocation failure during rolling decompression
Currently, err would be treated as io error. Therefore, it'd be better to ensure memory allocation during rolling decompression to avoid such io error. In the long term, we might consider adding another !Uptodate case for such case. Link: https://lore.kernel.org/r/20210316031515.90954-1-huangjianan@oppo.com Reviewed-by: Gao Xiang <hsiangkao@redhat.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Huang Jianan <huangjianan@oppo.com> Signed-off-by: Guo Weichao <guoweichao@oppo.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com> Bug: 190585249 Change-Id: I8bab4ab3e0d26b698fc0054517065872eafa5d15 (cherry picked from commit b4892fa3e7fd69e78a82356de45b90758589cafc) Signed-off-by: Huang Jianan <huangjianan@oppo.com>
This commit is contained in:
parent
534c9f0a10
commit
cdb254fa4d
1 changed files with 2 additions and 3 deletions
|
|
@ -77,9 +77,8 @@ static int z_erofs_lz4_prepare_destpages(struct z_erofs_decompress_req *rq,
|
|||
victim = availables[--top];
|
||||
get_page(victim);
|
||||
} else {
|
||||
victim = erofs_allocpage(pagepool, GFP_KERNEL);
|
||||
if (!victim)
|
||||
return -ENOMEM;
|
||||
victim = erofs_allocpage(pagepool,
|
||||
GFP_KERNEL | __GFP_NOFAIL);
|
||||
set_page_private(victim, Z_EROFS_SHORTLIVED_PAGE);
|
||||
}
|
||||
rq->out[i] = victim;
|
||||
|
|
|
|||
Loading…
Reference in a new issue