From: Jaegeuk Kim Date: Thu, 4 Dec 2014 04:47:26 +0000 (-0800) Subject: f2fs: call radix_tree_preload before radix_tree_insert X-Git-Tag: omap-for-v3.20/drop-legacy-3517~143^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769ec6e5b7d4a8115447736871be8bffaaba3a7d;p=pandora-kernel.git 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 [] (radix_tree_insert+0x110/0x200) (radix_tree_insert+0x110/0x200) from [] (gc_data_segment+0x340/0x52c) (gc_data_segment+0x340/0x52c) from [] (f2fs_gc+0x208/0x400) (f2fs_gc+0x208/0x400) from [] (gc_thread_func+0x248/0x28c) (gc_thread_func+0x248/0x28c) from [] (kthread+0xa0/0xac) (kthread+0xa0/0xac) from [] (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 --- Reading git-diff-tree failed