vserver 1.9.5.x5
[linux-2.6.git] / include / linux / pagemap.h
index 12f8116..c394c0c 100644 (file)
@@ -143,6 +143,14 @@ static inline unsigned long get_page_cache_size(void)
        return ret;
 }
 
+/*
+ * Return byte-offset into filesystem object for page.
+ */
+static inline loff_t page_offset(struct page *page)
+{
+       return ((loff_t)page->index) << PAGE_CACHE_SHIFT;
+}
+
 static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
                                        unsigned long address)
 {