summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-04-09 20:25:06 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-31 11:31:45 -0700
commit81114baa835b59ed02d14aa1d67f91ea874077cd (patch)
treeeded000624ab09f8f101120b54798527b60acb54 /fs/f2fs/segment.h
parent241b493d8fbda0ddbdcbd1e9be36c37b8a351281 (diff)
downloadtalos-obmc-linux-81114baa835b59ed02d14aa1d67f91ea874077cd.tar.gz
talos-obmc-linux-81114baa835b59ed02d14aa1d67f91ea874077cd.zip
f2fs: don't use GFP_ZERO for page caches
Related to https://lkml.org/lkml/2018/4/8/661 Sometimes, we need to write meta data to new allocated block address, then we will allocate a zeroed page in inner inode's address space, and fill partial data in it, and leave other place with zero value which means some fields are initial status. There are two inner inodes (meta inode and node inode) setting __GFP_ZERO, I have just checked them, for both of them, we can avoid using __GFP_ZERO, and do initialization by ourselves to avoid unneeded/redundant zeroing from mm. Cc: <stable@vger.kernel.org> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 3325d0769723..492ad0c86fa9 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -375,6 +375,7 @@ static inline void seg_info_to_sit_page(struct f2fs_sb_info *sbi,
int i;
raw_sit = (struct f2fs_sit_block *)page_address(page);
+ memset(raw_sit, 0, PAGE_SIZE);
for (i = 0; i < end - start; i++) {
rs = &raw_sit->entries[i];
se = get_seg_entry(sbi, start + i);
OpenPOWER on IntegriCloud