]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc0230a8598f6de1806d46f863ee13e5174e9aeed
tree4ab31b3146645c0fc691189c8aebac596b8fab16
parentb79de511e53814e7cfaebd9b9bc64870b29da431
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: 13bf7cb6da26 ("NFS: Revalidate the file mapping on all fatal writeback errors")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/write.c