]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: fix O_SYNC write handling
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 14 Jan 2020 16:12:18 +0000 (17:12 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 6 Feb 2020 17:49:41 +0000 (18:49 +0100)
commitfe278d333aa14628e872d7d7285898dd8f362819
tree0a5a4c20e89e2b402fab07ade9bfca0e2226ce78
parenta1d678cfc3118aa5c5d4fa49369e914b6d922c8d
gfs2: fix O_SYNC write handling

In gfs2_file_write_iter, for direct writes, the error checking in the buffered
write fallback case is incomplete.  This can cause inode write errors to go
undetected.  Fix and clean up gfs2_file_write_iter along the way.

Based on a proposed fix by Christoph Hellwig <hch@lst.de>.

Fixes: d11a253b7541 ("gfs2: iomap direct I/O support")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c