summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 046077b4209d..028e84e2ab42 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1048,19 +1048,19 @@ struct address_space *page_file_mapping(struct page *page)
return page->mapping;
}
+extern pgoff_t __page_file_index(struct page *page);
+
/*
* Return the pagecache index of the passed page. Regular pagecache pages
- * use ->index whereas swapcache pages use ->private
+ * use ->index whereas swapcache pages use swp_offset(->private)
*/
static inline pgoff_t page_index(struct page *page)
{
if (unlikely(PageSwapCache(page)))
- return page_private(page);
+ return __page_file_index(page);
return page->index;
}
-extern pgoff_t __page_file_index(struct page *page);
-
/*
* Return the file index of the page. Regular pagecache pages use ->index
* whereas swapcache pages use swp_offset(->private)