alistair23-linux/fs/f2fs
Zhikang Zhang b430f72636 f2fs: avoid sleeping under spin_lock
In the call trace below, we might sleep in function dput().

So in order to avoid sleeping under spin_lock, we remove f2fs_mark_inode_dirty_sync
from __try_update_largest_extent && __drop_largest_extent.

BUG: sleeping function called from invalid context at fs/dcache.c:796
Call trace:
	dump_backtrace+0x0/0x3f4
	show_stack+0x24/0x30
	dump_stack+0xe0/0x138
	___might_sleep+0x2a8/0x2c8
	__might_sleep+0x78/0x10c
	dput+0x7c/0x750
	block_dump___mark_inode_dirty+0x120/0x17c
	__mark_inode_dirty+0x344/0x11f0
	f2fs_mark_inode_dirty_sync+0x40/0x50
	__insert_extent_tree+0x2e0/0x2f4
	f2fs_update_extent_tree_range+0xcf4/0xde8
	f2fs_update_extent_cache+0x114/0x12c
	f2fs_update_data_blkaddr+0x40/0x50
	write_data_page+0x150/0x314
	do_write_data_page+0x648/0x2318
	__write_data_page+0xdb4/0x1640
	f2fs_write_cache_pages+0x768/0xafc
	__f2fs_write_data_pages+0x590/0x1218
	f2fs_write_data_pages+0x64/0x74
	do_writepages+0x74/0xe4
	__writeback_single_inode+0xdc/0x15f0
	writeback_sb_inodes+0x574/0xc98
	__writeback_inodes_wb+0x190/0x204
	wb_writeback+0x730/0xf14
	wb_check_old_data_flush+0x1bc/0x1c8
	wb_workfn+0x554/0xf74
	process_one_work+0x440/0x118c
	worker_thread+0xac/0x974
	kthread+0x1a0/0x1c8
	ret_from_fork+0x10/0x1c

Signed-off-by: Zhikang Zhang <zhangzhikang1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-09-11 17:09:32 -07:00
..
acl.c f2fs: cache NULL when both default_acl and acl are NULL 2018-09-11 13:16:03 -07:00
acl.h
checkpoint.c f2fs: fix to flush all dirty inodes recovered in readonly fs 2018-09-11 13:16:03 -07:00
data.c f2fs: submit bio after shutdown 2018-09-07 14:26:43 -07:00
debug.c f2fs: fix to avoid NULL pointer dereference on se->discard_map 2018-09-05 13:40:31 -07:00
dir.c f2fs: plug readahead IO in readdir() 2018-09-11 17:09:32 -07:00
extent_cache.c f2fs: avoid sleeping under spin_lock 2018-09-11 17:09:32 -07:00
f2fs.h f2fs: avoid sleeping under spin_lock 2018-09-11 17:09:32 -07:00
file.c f2fs: avoid wrong decrypted data from disk 2018-09-05 13:41:07 -07:00
gc.c f2fs: readahead encrypted block during GC 2018-08-20 23:13:42 -07:00
gc.h f2fs: introduce sbi->gc_mode to determine the policy 2018-05-31 11:31:51 -07:00
hash.c
inline.c f2fs: fix to propagate error from __get_meta_page() 2018-08-01 11:52:36 -07:00
inode.c f2fs: fix to skip verifying block address for non-regular inode 2018-08-14 10:29:11 -07:00
Kconfig
Makefile
namei.c f2fs: Replace strncpy with memcpy 2018-07-28 18:26:08 -07:00
node.c f2fs: rework fault injection handling to avoid a warning 2018-08-14 09:49:15 -07:00
node.h f2fs: let checkpoint flush dnode page of regular 2018-08-01 11:52:36 -07:00
recovery.c f2fs: fix to flush all dirty inodes recovered in readonly fs 2018-09-11 13:16:03 -07:00
segment.c f2fs: avoid wrong decrypted data from disk 2018-09-05 13:41:07 -07:00
segment.h f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc 2018-08-20 23:13:42 -07:00
shrinker.c f2fs: clean up symbol namespace 2018-05-31 11:31:53 -07:00
super.c f2fs: fix to do sanity check with current segment number 2018-09-11 17:09:32 -07:00
sysfs.c f2fs: fix performance issue observed with multi-thread sequential read 2018-08-20 23:13:42 -07:00
trace.c
trace.h
xattr.c f2fs: restrict setting up inode.i_advise 2018-08-01 11:52:36 -07:00
xattr.h