ext4: fix DAX write locking
authorChristoph Hellwig <hch@lst.de>
Wed, 8 Feb 2017 19:39:27 +0000 (14:39 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 8 Feb 2017 19:39:27 +0000 (14:39 -0500)
commitff5462e39ca1d27e530d088c4e38741fd9cddad4
tree5a1baca148ac859d2f676e2f0bb120e23fef764d
parent783d948544993f55bdacc78b127532e8b6e2fc9f
ext4: fix DAX write locking

Unlike O_DIRECT DAX is not an optional opt-in feature selected by the
application, so we'll have to provide the traditional synchronŃ–zation
of overlapping writes as we do for buffered writes.

This was broken historically for DAX, but got fixed for ext2 and XFS
as part of the iomap conversion.  Fix up ext4 as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/file.c