diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-16 10:30:09 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-06-29 08:51:07 -0400 |
commit | 0b768a9610c6de9811c6d33900bebfb665192ee1 (patch) | |
tree | e26e84d997a0486aa270e0bda0be2f4cb9fac1af /fs/nfs | |
parent | 6e8e79fc84435c159891182cddab8e7784e1b3b2 (diff) | |
download | linux-stable-0b768a9610c6de9811c6d33900bebfb665192ee1.tar.gz linux-stable-0b768a9610c6de9811c6d33900bebfb665192ee1.tar.bz2 linux-stable-0b768a9610c6de9811c6d33900bebfb665192ee1.zip |
nfs: Leave pages in the pagecache if readpage failed
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/read.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 5a9b043662e9..8ae2c8d1219d 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -120,12 +120,8 @@ static void nfs_readpage_release(struct nfs_page *req, int error) if (nfs_error_is_fatal_on_server(error) && error != -ETIMEDOUT) SetPageError(page); if (nfs_page_group_sync_on_bit(req, PG_UNLOCKPAGE)) { - struct address_space *mapping = page_file_mapping(page); - if (PageUptodate(page)) nfs_fscache_write_page(inode, page); - else if (!PageError(page) && !PagePrivate(page)) - generic_error_remove_page(mapping, page); unlock_page(page); } nfs_release_request(req); |