]> git.baikalelectronics.ru Git - kernel.git/commit
dax: Fix sleep in atomic contex in grab_mapping_entry()
authorJan Kara <jack@suse.cz>
Tue, 13 Dec 2016 02:34:12 +0000 (21:34 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 13 Dec 2016 02:34:12 +0000 (21:34 -0500)
commit543b16f2ddca88c98ae8f75714a468a776c69c2e
treee16efd7948740c035aef5fad3af596089e6e03da
parent33c3e12f2b8a68b26067fcedb1195c55bf98d671
dax: Fix sleep in atomic contex in grab_mapping_entry()

Commit 36f80f5f9b00: "dax: add struct iomap based DAX PMD support" has
introduced unmapping of page tables if huge page needs to be split in
grab_mapping_entry(). However the unmapping happens after
radix_tree_preload() call which disables preemption and thus
unmap_mapping_range() tries to acquire i_mmap_lock in atomic context
which is a bug. Fix the problem by moving unmapping before
radix_tree_preload() call.

Fixes: 36f80f5f9b00e3b54649f001f06ad4a790285ea8
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/dax.c