OSDN Git Service

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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 12 Mar 2018 23:20:23 +0000 (08:20 +0900)
commit39ed8376d611d2a211079be6a2ac08715f5a58c4
tree5a94aa4d1fa8be22a321d66f38772f2b0af5b452
parent5f9b3abb911fa2f51f5690f4376cf919c2069662
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.

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