gfs2: Prevent direct-I/O write fallback errors from getting lost
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 10 May 2021 10:25:59 +0000 (12:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 08:00:04 +0000 (10:00 +0200)
commitc3e9ea16adc1ce378e7c1416dace0c93631e2fcc
treebea0d67407fcc858fc9657ce023ba4aa7d313143
parent864b5a8d5390765ddb8e82b86b111de86868d65f
gfs2: Prevent direct-I/O write fallback errors from getting lost

[ Upstream commit 43a511c44e58e357a687d61a20cf5ef1dc9e5a7c ]

When a direct I/O write falls entirely and falls back to buffered I/O and the
buffered I/O fails, the write failed with return value 0 instead of the error
number reported by the buffered I/O. Fix that.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/gfs2/file.c