]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Sep 2015 22:35:28 +0000 (15:35 -0700)
commitfeab5bf36d7d4f0c82c954f8da15e48a15db5d4e
treef65f2883e5c1f46691eea046e5986a28558cb687
parentb92078fa8ed2692df39853475ada91445ccdf19f
ext4: start transaction before calling into DAX

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>
fs/ext4/file.c