]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 05:19:20 +0000 (01:19 -0400)
commit549a400b96939a5dbe1a17e44bb9377fa85a79cb
treee1933bc77c4829d2b91bcd00fd873053bca3a5f1
parent143098549450153870efe8a4ec3fa0bc0b53fa53
gfs2: fix O_SYNC write handling

BugLink: https://bugs.launchpad.net/bugs/1867051
commit 6e5e41e2dc4e4413296d5a4af54ac92d7cd52317 upstream.

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: 967bcc91b044 ("gfs2: iomap direct I/O support")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/gfs2/file.c