nfs: Leave pages in the pagecache if readpage failed
commit 0b768a9610c6de9811c6d33900bebfb665192ee1 upstream. The pagecache handles readpage failing by itself; it doesn't want filesystems to remove pages from under it. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d59bb70350
commit
6a91d8eb5a
1 changed files with 0 additions and 4 deletions
|
|
@ -103,12 +103,8 @@ static void nfs_readpage_release(struct nfs_page *req, int error)
|
||||||
if (nfs_error_is_fatal_on_server(error) && error != -ETIMEDOUT)
|
if (nfs_error_is_fatal_on_server(error) && error != -ETIMEDOUT)
|
||||||
SetPageError(page);
|
SetPageError(page);
|
||||||
if (nfs_page_group_sync_on_bit(req, PG_UNLOCKPAGE)) {
|
if (nfs_page_group_sync_on_bit(req, PG_UNLOCKPAGE)) {
|
||||||
struct address_space *mapping = page_file_mapping(page);
|
|
||||||
|
|
||||||
if (PageUptodate(page))
|
if (PageUptodate(page))
|
||||||
nfs_readpage_to_fscache(inode, page, 0);
|
nfs_readpage_to_fscache(inode, page, 0);
|
||||||
else if (!PageError(page) && !PagePrivate(page))
|
|
||||||
generic_error_remove_page(mapping, page);
|
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
}
|
}
|
||||||
nfs_release_request(req);
|
nfs_release_request(req);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue