[RFC:PATCH 05/07] find_get_page() and find_lock_page() need to unpack the tail

Dave Kleikamp
2007-08-29T20:53:54Z

find_get_page() and find_lock_page() need to unpack the tail

If the page being sought corresponds to the tail, and the tail is packed
in the inode, the tail must be unpacked.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---

mm/filemap.c | 3 +++
1 file changed, 3 insertions(+)

diff -Nurp linux004/mm/filemap.c linux005/mm/filemap.c
--- linux004/mm/filemap.c 2007-08-28 09:57:20.000000000 -0500
+++ linux005/mm/filemap.c 2007-08-29 13:27:46.000000000 -0500
@@ -24,6 +24,7 @@
#include <linux/file.h>
#include <linux/uio.h>
#include <linux/hash.h>
+#include <linux/vm_file_tail.h>
#include <linux/writeback.h>
#include <linux/pagevec.h>
#include <linux/blkdev.h>
@@ -597,6 +598,7 @@ struct page * find_get_page(struct addre
{
struct page *page;

+ vm_file_tail_unpack_index(mapping, offset);
read_lock_irq(&mapping->tree_lock);
page = radix_tree_lookup(&mapping->page_tree, offset);
if (page)
@@ -621,6 +623,7 @@ struct page *find_lock_page(struct addre
{
struct page *page;

+ vm_file_tail_unpack_index(mapping, offset);
read_lock_irq(&mapping->tree_lock);
repeat:
page = radix_tree_lookup(&mapping->page_tree, offset);