You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
NFS: Flesh out nfs_invalidate_page()
In the case of a call to truncate_inode_pages(), we should really try to cancel any pending writes on the page. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
+5
-1
@@ -303,7 +303,11 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse
|
||||
|
||||
static void nfs_invalidate_page(struct page *page, unsigned long offset)
|
||||
{
|
||||
/* FIXME: we really should cancel any unstarted writes on this page */
|
||||
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);
|
||||
}
|
||||
|
||||
static int nfs_release_page(struct page *page, gfp_t gfp)
|
||||
|
||||
Reference in New Issue
Block a user