linux-hardened/fs/f2fs
Jaegeuk Kim 769ec6e5b7 f2fs: call radix_tree_preload before radix_tree_insert
This patch tries to fix:

 BUG: using smp_processor_id() in preemptible [00000000] code: f2fs_gc-254:0/384
  (radix_tree_node_alloc+0x14/0x74) from [<c033d8a0>] (radix_tree_insert+0x110/0x200)
  (radix_tree_insert+0x110/0x200) from [<c02e8264>] (gc_data_segment+0x340/0x52c)
  (gc_data_segment+0x340/0x52c) from [<c02e8658>] (f2fs_gc+0x208/0x400)
  (f2fs_gc+0x208/0x400) from [<c02e8a98>] (gc_thread_func+0x248/0x28c)
  (gc_thread_func+0x248/0x28c) from [<c0139944>] (kthread+0xa0/0xac)
  (kthread+0xa0/0xac) from [<c0105ef8>] (ret_from_fork+0x14/0x3c)

The reason is that f2fs calls radix_tree_insert under enabled preemption.
So, before calling it, we need to call radix_tree_preload.

Otherwise, we should use _GFP_WAIT for the radix tree, and use mutex or
semaphore to cover the radix tree operations.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-12-05 09:51:04 -08:00
..
acl.c f2fs: remove the redundant function cond_clear_inode_flag 2014-11-03 16:07:36 -08:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: call radix_tree_preload before radix_tree_insert 2014-12-05 09:51:04 -08:00
data.c f2fs: fix to return correct error number in f2fs_write_begin 2014-12-01 13:56:02 -08:00
debug.c f2fs: introduce struct inode_management to wrap inner fields 2014-11-19 22:49:32 -08:00
dir.c f2fs: introduce f2fs_dentry_kunmap to clean up 2014-11-23 21:51:53 -08:00
f2fs.h f2fs: use rw_semaphore for nat entry lock 2014-12-03 21:23:29 -08:00
file.c f2fs: cleanup redundant macro 2014-12-01 14:16:50 -08:00
gc.c f2fs: call radix_tree_preload before radix_tree_insert 2014-12-05 09:51:04 -08:00
gc.h f2fs: more fast lookup for gc_inode list 2014-12-02 11:02:50 -08:00
hash.c f2fs: fix wrong casting for dentry name 2014-08-29 00:26:50 -07:00
inline.c f2fs: fix to recover converted inline_data 2014-11-25 18:08:00 -08:00
inode.c f2fs: revisit inline_data to avoid data races and potential bugs 2014-11-04 17:34:11 -08:00
Kconfig f2fs: fix typo 2014-08-19 10:01:33 -07:00
Makefile f2fs: key functions to handle inline data 2013-12-26 20:40:09 +09:00
namei.c f2fs: introduce f2fs_dentry_kunmap to clean up 2014-11-23 21:51:53 -08:00
node.c f2fs: call radix_tree_preload before radix_tree_insert 2014-12-05 09:51:04 -08:00
node.h f2fs: control the memory footprint used by ino entries 2014-11-06 15:24:46 -08:00
recovery.c f2fs: introduce f2fs_dentry_kunmap to clean up 2014-11-23 21:51:53 -08:00
segment.c f2fs: fix livelock calling f2fs_iget during f2fs_evict_inode 2014-11-23 21:51:57 -08:00
segment.h f2fs: do not skip any writes under memory pressure 2014-11-10 06:51:38 -08:00
super.c f2fs: remove unneeded check code with option in f2fs_remount 2014-11-19 22:49:31 -08:00
xattr.c f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
xattr.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00