-static void nfs_invalidate_page(struct page *page, unsigned long offset)
-{
- struct inode *inode = page->mapping->host;
-
- /* Cancel any unstarted writes on this page */
- if (offset == 0)
- nfs_sync_inode_wait(inode, page->index, 1, FLUSH_INVALIDATE);
-
- nfs_fscache_invalidate_page(page, inode, offset);
-
- /* we can do this here as the bits are only set with the page lock
- * held, and our caller is holding that */
- if (!page->private)
- ClearPagePrivate(page);
-}
-
-static int nfs_release_page(struct page *page, gfp_t gfp)
-{
- if (gfp & __GFP_FS) {
- int error = nfs_wb_page(page->mapping->host, page);
-
- if (error == 0) {
- nfs_fscache_release_page(page);
-
- /* may have been set due to either caching or writing */
- ClearPagePrivate(page);
- }
-
- /* releasepage() returns true/false */
- return (error == 0) ? 1 : 0;
- }
- else
- /*
- * Avoid deadlock on nfs_wait_on_request().
- */
- return 0;
-}
-
-/*
- * Since we use page->private for our own nefarious purposes when using
- * fscache, we have to override extra address space ops to prevent fs/buffer.c
- * from getting confused, even though we may not have asked its opinion
- */
-const struct address_space_operations nfs_file_aops = {