All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] erofs: avoid memory allocation failure during rolling decompression
@ 2021-03-05  6:22 ` Huang Jianan via Linux-erofs
  0 siblings, 0 replies; 22+ messages in thread
From: Huang Jianan @ 2021-03-05  6:22 UTC (permalink / raw)
  To: linux-erofs; +Cc: huangjianan, guoweichao, zhangshiming, linux-kernel

It should be better to ensure memory allocation during rolling
decompression to avoid io error.

Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
---
 fs/erofs/decompressor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 49347e681a53..fb0fa4e5b9ea 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -86,7 +86,7 @@ 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);
+			victim = erofs_allocpage(pagepool, GFP_KERNEL | __GFP_NOFAIL);
 			if (!victim)
 				return -ENOMEM;
 			set_page_private(victim, Z_EROFS_SHORTLIVED_PAGE);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-03-16  1:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  6:22 [PATCH 1/2] erofs: avoid memory allocation failure during rolling decompression Huang Jianan
2021-03-05  6:22 ` Huang Jianan via Linux-erofs
2021-03-05  6:22 ` [PATCH 2/2] erofs: decompress in endio if possible Huang Jianan
2021-03-05  6:22   ` Huang Jianan via Linux-erofs
2021-03-05  6:41   ` Gao Xiang
2021-03-05  6:41     ` Gao Xiang
2021-03-05  8:21   ` kernel test robot
2021-03-05  8:21     ` kernel test robot
2021-03-05  8:21     ` kernel test robot
2021-03-05  6:45 ` [PATCH 1/2] erofs: avoid memory allocation failure during rolling decompression Gao Xiang
2021-03-05  6:45   ` Gao Xiang
2021-03-05  9:58 ` [PATCH v5 " Huang Jianan
2021-03-05  9:58   ` Huang Jianan via Linux-erofs
2021-03-05  9:58   ` [PATCH v5 2/2] erofs: decompress in endio if possible Huang Jianan
2021-03-05  9:58     ` Huang Jianan via Linux-erofs
2021-03-15 11:28     ` Gao Xiang
2021-03-15 11:28       ` Gao Xiang
2021-03-15 11:24   ` [PATCH v5 1/2] erofs: avoid memory allocation failure during rolling decompression Gao Xiang
2021-03-15 11:24     ` Gao Xiang
2021-03-16  1:11   ` Chao Yu
2021-03-16  1:11     ` Chao Yu
2021-03-16  1:29     ` Gao Xiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.