]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: start transaction before calling into DAX
authorMatthew Wilcox <willy@linux.intel.com>
Tue, 8 Sep 2015 21:59:22 +0000 (14:59 -0700)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:19:45 +0000 (12:19 -0500)
commit1ba4997eae536e0cb4feb0af2f145bf7ba56eb17
tree360078ee0b97c8b731f1d73c155c9e491e9d8b21
parentfe66b4ede6a63c0d834dd71d3ed9dc64d00d588b
ext4: start transaction before calling into DAX

Orabug: 22913653

Jan Kara pointed out that in the case where we are writing to a hole, we
can end up with a lock inversion between the page lock and the journal
lock.  We can avoid this by starting the transaction in ext4 before
calling into DAX.  The journal lock nests inside the superblock
pagefault lock, so we have to duplicate that code from dax_fault, like
XFS does.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 01a33b4ace68bc35679a347f21d5ed6e222e30dc)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/ext4/file.c