OpenCloudOS-Kernel/fs/f2fs
Chao Yu bf617f7a92 f2fs: fix to check extent cache in f2fs_drop_extent_tree
If noextent_cache mount option is on, we will never initialize extent tree
in inode, but still we're going to access it in f2fs_drop_extent_tree,
result in kernel panic as below:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
 IP: _raw_write_lock+0xc/0x30
 Call Trace:
  ? f2fs_drop_extent_tree+0x41/0x70 [f2fs]
  f2fs_fallocate+0x5a0/0xdd0 [f2fs]
  ? common_file_perm+0x47/0xc0
  ? apparmor_file_permission+0x1a/0x20
  vfs_fallocate+0x15b/0x290
  SyS_fallocate+0x44/0x70
  do_syscall_64+0x6e/0x160
  entry_SYSCALL64_slow_path+0x25/0x25

This patch fixes to check extent cache status before using in
f2fs_drop_extent_tree.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-03-13 08:05:32 +09:00
..
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.c posix_acl: convert posix_acl.a_refcount from atomic_t to refcount_t 2018-01-02 19:27:28 -08:00
acl.h f2fs: remove dead code f2fs_check_acl 2016-09-14 16:52:36 -07:00
checkpoint.c f2fs: allow to recover node blocks given updated checkpoint 2018-01-22 14:56:59 -08:00
data.c f2fs-for-4.16-rc1 2018-01-30 19:07:32 -08:00
debug.c f2fs: inject fault to kzalloc 2018-01-02 19:27:29 -08:00
dir.c f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
extent_cache.c f2fs: fix to check extent cache in f2fs_drop_extent_tree 2018-03-13 08:05:32 +09:00
f2fs.h f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
file.c f2fs: support inode creation time 2018-01-25 14:10:39 -08:00
gc.c f2fs: fix heap mode to reset it back 2018-03-13 08:05:30 +09:00
gc.h f2fs: add an ioctl to disable GC for specific file 2018-01-22 14:56:35 -08:00
hash.c f2fs: check entire encrypted bigname when finding a dentry 2017-05-04 11:44:35 -04:00
inline.c f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
inode.c f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
namei.c f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
node.c f2fs: use GFP_F2FS_ZERO for cleanup 2018-01-25 10:39:49 -08:00
node.h f2fs: allow to recover node blocks given updated checkpoint 2018-01-22 14:56:59 -08:00
recovery.c f2fs: don't put dentry page in pagecache into highmem 2018-03-13 08:05:03 +09:00
segment.c f2fs: fix heap mode to reset it back 2018-03-13 08:05:30 +09:00
segment.h f2fs: rebuild sit page from sit info in mem 2018-01-25 10:44:34 -08:00
shrinker.c f2fs: obsolete ALLOC_NID_LIST list 2017-10-10 12:49:53 -07:00
super.c f2fs: restrict inline_xattr_size configuration 2018-03-13 08:05:31 +09:00
sysfs.c f2fs: support inode creation time 2018-01-25 14:10:39 -08:00
trace.c f2fs: fix potential hangtask in f2fs_trace_pid 2018-01-02 19:27:30 -08:00
trace.h f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
xattr.c f2fs: correct removexattr behavior for null valued extended attribute 2018-01-22 14:56:57 -08:00
xattr.h f2fs: guard macro variables with braces 2017-04-10 19:48:10 -07:00