]> git.ipfire.org Git - people/ms/linux.git/commit - fs/nfs/write.c
NFS: Use of mapping_set_error() results in spurious errors
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 15 Feb 2022 20:58:38 +0000 (15:58 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 25 Feb 2022 23:50:13 +0000 (18:50 -0500)
commit6c984083ec2453dfd3fcf98f392f34500c73e3f2
tree4ab31b3146645c0fc691189c8aebac596b8fab16
parent84631f84ac95b6ff6f08a41ffba1f93eaab4e9c7
NFS: Use of mapping_set_error() results in spurious errors

The use of mapping_set_error() in conjunction with calls to
filemap_check_errors() is problematic because every error gets reported
as either an EIO or an ENOSPC by filemap_check_errors() in functions
such as filemap_write_and_wait() or filemap_write_and_wait_range().
In almost all cases, we prefer to use the more nuanced wb errors.

Fixes: b8946d7bfb94 ("NFS: Revalidate the file mapping on all fatal writeback errors")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/write.c