summaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust2006-10-09 22:18:38 +0200
committerTrond Myklebust2006-12-06 16:46:35 +0100
commit1c75950b9a2254ef08f986e00ad20266ae9ba7f1 (patch)
treecc1a242601b27b8128c8c385f1b858a7b863f155 /include/linux/nfs_fs.h
parentNFS: Clean up nfs_scan_dirty() (diff)
downloadkernel-qcow2-linux-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.tar.gz
kernel-qcow2-linux-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.tar.xz
kernel-qcow2-linux-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.zip
NFS: cleanup of nfs_sync_inode_wait()
Allow callers to directly pass it a struct writeback_control. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index f8190ae9e3fb..f2ec9be1e22f 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -432,7 +432,10 @@ extern void nfs_writedata_release(void *);
* Try to write back everything synchronously (but check the
* return value!)
*/
-extern long nfs_sync_inode_wait(struct inode *, unsigned long, unsigned int, int);
+extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_control *, int);
+extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);
+extern int nfs_wb_all(struct inode *inode);
+extern int nfs_wb_page(struct inode *inode, struct page* page);
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
extern int nfs_commit_inode(struct inode *, int);
extern struct nfs_write_data *nfs_commit_alloc(void);
@@ -452,28 +455,6 @@ nfs_have_writebacks(struct inode *inode)
return NFS_I(inode)->npages != 0;
}
-static inline int
-nfs_wb_all(struct inode *inode)
-{
- int error = nfs_sync_inode_wait(inode, 0, 0, 0);
- return (error < 0) ? error : 0;
-}
-
-/*
- * Write back all requests on one page - we do this before reading it.
- */
-static inline int nfs_wb_page_priority(struct inode *inode, struct page* page, int how)
-{
- int error = nfs_sync_inode_wait(inode, page->index, 1,
- how | FLUSH_STABLE);
- return (error < 0) ? error : 0;
-}
-
-static inline int nfs_wb_page(struct inode *inode, struct page* page)
-{
- return nfs_wb_page_priority(inode, page, 0);
-}
-
/*
* Allocate nfs_write_data structures
*/