mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
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: b8946d7bfb
("NFS: Revalidate the file mapping on all fatal writeback errors")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
84631f84ac
commit
6c984083ec
@ -316,7 +316,10 @@ static void nfs_mapping_set_error(struct page *page, int error)
|
||||
struct address_space *mapping = page_file_mapping(page);
|
||||
|
||||
SetPageError(page);
|
||||
mapping_set_error(mapping, error);
|
||||
filemap_set_wb_err(mapping, error);
|
||||
if (mapping->host)
|
||||
errseq_set(&mapping->host->i_sb->s_wb_err,
|
||||
error == -ENOSPC ? -ENOSPC : -EIO);
|
||||
nfs_set_pageerror(mapping);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user