NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 14 May 2022 14:27:01 +0000 (10:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:15 +0000 (10:23 +0200)
commit0d548c0c7082f08f5d7dbab8da0a7475ce8c5099
treec189ae69121aa148e1bf7cc60d861606f7c56b82
parent79e0b7436bc4673ac8e6868bab681450e7d57cec
NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS

[ Upstream commit 9641d9bc9b75f11f70646f5c6ee9f5f519a1012e ]

If the commit to disk is interrupted, we should still first check for
filesystem errors so that we can report them in preference to the error
due to the signal.

Fixes: 2197e9b06c22 ("NFS: Fix up fsync() when the server rebooted")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/file.c