From: Gao Xiang Date: Tue, 19 Feb 2019 02:31:52 +0000 (+0800) Subject: f2fs: silence VM_WARN_ON_ONCE in mempool_alloc X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~3300^2~19 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bc73a4b2414f2914fa895747166312b1527a97bb;p=mirror_ubuntu-focal-kernel.git f2fs: silence VM_WARN_ON_ONCE in mempool_alloc Note that __GFP_ZERO is not supported for mempool_alloc, which also documented in the mempool_alloc comments. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index e099babf85bd..65c9586b2952 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -299,9 +299,10 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi, for (; start < F2FS_IO_SIZE(sbi); start++) { struct page *page = mempool_alloc(sbi->write_io_dummy, - GFP_NOIO | __GFP_ZERO | __GFP_NOFAIL); + GFP_NOIO | __GFP_NOFAIL); f2fs_bug_on(sbi, !page); + zero_user_segment(page, 0, PAGE_SIZE); SetPagePrivate(page); set_page_private(page, (unsigned long)DUMMY_WRITTEN_PAGE); lock_page(page);