f2fs: don't use GFP_ZERO for page caches
authorChao Yu <yuchao0@huawei.com>
Mon, 9 Apr 2018 12:25:06 +0000 (20:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:27:04 +0000 (11:27 +0200)
commitbc2bad3b87004ced2c07d185c04386eb8d8d6952
tree459f5033a8708e2b4883d90ad68c08a5b8d7fb2d
parentfca2a4240d9a0a1bbfcc7636e8ca103e52427fea
f2fs: don't use GFP_ZERO for page caches

commit 81114baa835b59ed02d14aa1d67f91ea874077cd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/checkpoint.c
fs/f2fs/inode.c
fs/f2fs/segment.c
fs/f2fs/segment.h