diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs_fs.h | 8 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c77fa88af5db..582c7aa90344 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -25,6 +25,7 @@ #include <linux/nfs.h> #include <linux/nfs2.h> #include <linux/nfs3.h> +#include <linux/nfs_page.h> #include <linux/nfs_xdr.h> /* @@ -243,9 +244,9 @@ loff_t page_offset(struct page *page) } static inline -unsigned long page_index(struct page *page) +loff_t req_offset(struct nfs_page *req) { - return page->index; + return ((loff_t)req->wb_index) << PAGE_CACHE_SHIFT; } /* @@ -360,7 +361,8 @@ nfs_wb_all(struct inode *inode) static inline int nfs_wb_page(struct inode *inode, struct page* page) { - int error = nfs_sync_file(inode, 0, page_index(page), 1, FLUSH_WAIT | FLUSH_STABLE); + int error = nfs_sync_file(inode, 0, page->index, 1, + FLUSH_WAIT | FLUSH_STABLE); return (error < 0) ? error : 0; } diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 6bc44a6b1cb7..9fc362b75850 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -33,7 +33,8 @@ struct nfs_page { struct page *wb_page; /* page to read in/write out */ wait_queue_head_t wb_wait; /* wait queue */ unsigned long wb_timeout; /* when to read/write/commit */ - unsigned int wb_offset, /* Offset of read/write */ + unsigned long wb_index; /* Offset within mapping */ + unsigned int wb_offset, /* Offset within page */ wb_bytes, /* Length of request */ wb_count; /* reference count */ unsigned long wb_flags; |
