summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-02-19 10:31:52 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-03-14 13:57:36 -0700
commit7307334f43684753f9bd4228a126d57cd20d6c1e (patch)
tree48877be5e97a7aaa451bb62adc6cd29c540efca5
parent66ebc2e50a523c2079cdc798286d2b6932d7bb64 (diff)
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 <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 16a389733eb8..ba03cb1412f8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -296,9 +296,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);