summaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-12-05 16:20:43 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 14:32:38 -0500
commitd6c843b96e1cb5199147e3281a724e3c0b69a9ab (patch)
tree73d556f77eb68743a0752e150c493bd4062cad59 /include/linux/nfs_fs.h
parent0bcbf039f6b2bcefe4f5dada76079080edf9ecd0 (diff)
downloadlinux-stable-d6c843b96e1cb5199147e3281a724e3c0b69a9ab.tar.gz
linux-stable-d6c843b96e1cb5199147e3281a724e3c0b69a9ab.tar.bz2
linux-stable-d6c843b96e1cb5199147e3281a724e3c0b69a9ab.zip
nfs: only remove page from mapping if launder_page fails
Instead of dropping pages when write fails, only do it when we get fatal failure in launder_page write back. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index c0e961474a52..b88fc46cfbb8 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -517,13 +517,25 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned
*/
extern int nfs_sync_inode(struct inode *inode);
extern int nfs_wb_all(struct inode *inode);
-extern int nfs_wb_page(struct inode *inode, struct page* page);
+extern int nfs_wb_single_page(struct inode *inode, struct page *page, bool launder);
extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
extern int nfs_commit_inode(struct inode *, int);
extern struct nfs_commit_data *nfs_commitdata_alloc(void);
extern void nfs_commit_free(struct nfs_commit_data *data);
static inline int
+nfs_wb_launder_page(struct inode *inode, struct page *page)
+{
+ return nfs_wb_single_page(inode, page, true);
+}
+
+static inline int
+nfs_wb_page(struct inode *inode, struct page *page)
+{
+ return nfs_wb_single_page(inode, page, false);
+}
+
+static inline int
nfs_have_writebacks(struct inode *inode)
{
return NFS_I(inode)->nrequests != 0;