FROMLIST: f2fs: don't put dentry page in pagecache into highmem
authorYunlong Song <yunlong.song@huawei.com>
Wed, 28 Feb 2018 12:31:52 +0000 (20:31 +0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 13 Mar 2018 11:55:36 +0000 (11:55 +0000)
commite9931e76ecc79cc66eb8cdf8720f3a38ca90776c
tree559160322b156c34cb580718ea2a11b4a20cad37
parent4576e0eca90e8c644d8583937ac532705a553313
FROMLIST: f2fs: don't put dentry page in pagecache into highmem

Cherry-pick from origin/upstream-f2fs-stable-linux-4.14.y:
88406d1edeee ("f2fs: don't put dentry page in pagecache into highmem")

Previous dentry page uses highmem, which will cause panic in platforms
using highmem (such as arm), since the address space of dentry pages
from highmem directly goes into the decryption path via the function
fscrypt_fname_disk_to_usr. But sg_init_one assumes the address is not
from highmem, and then cause panic since it doesn't call kmap_high but
kunmap_high is triggered at the end. To fix this problem in a simple
way, this patch avoids to put dentry page in pagecache into highmem.

Change-Id: I4982f527bd054176bf21d72a426e08cf2b985b0c
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix coding style]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/namei.c
fs/f2fs/recovery.c
include/linux/f2fs_fs.h