Commit f4f11702 authored by Trond Myklebust's avatar Trond Myklebust Committed by Zheng Zengkai
Browse files

NFS: Use of mapping_set_error() results in spurious errors

stable inclusion
from stable-v5.10.110
commit 469ce5119f221ecf09549d0fadf340344df0309e
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=469ce5119f221ecf09549d0fadf340344df0309e



--------------------------------

[ Upstream commit 6c984083 ]

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: b8946d7b ("NFS: Revalidate the file mapping on all fatal writeback errors")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 43443003
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment