
From: Christoph Hellwig <hch@lst.de>

filemap_populate needs to be exported so that filesystems with their own
vm_operations (like XFS) can use it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/xfs/linux-2.6/xfs_file.c |    1 +
 25-akpm/include/linux/mm.h          |    4 +++-
 25-akpm/mm/filemap.c                |   10 ++++------
 3 files changed, 8 insertions(+), 7 deletions(-)

diff -puN fs/xfs/linux-2.6/xfs_file.c~add-map_populate-sys_remap_file_pages-support-to-xfs fs/xfs/linux-2.6/xfs_file.c
--- 25/fs/xfs/linux-2.6/xfs_file.c~add-map_populate-sys_remap_file_pages-support-to-xfs	2005-01-16 14:43:08.641944360 -0800
+++ 25-akpm/fs/xfs/linux-2.6/xfs_file.c	2005-01-16 14:43:08.647943448 -0800
@@ -528,6 +528,7 @@ struct file_operations linvfs_dir_operat
 
 static struct vm_operations_struct linvfs_file_vm_ops = {
 	.nopage		= filemap_nopage,
+	.populate	= filemap_populate,
 #ifdef HAVE_VMOP_MPROTECT
 	.mprotect	= linvfs_mprotect,
 #endif
diff -puN include/linux/mm.h~add-map_populate-sys_remap_file_pages-support-to-xfs include/linux/mm.h
--- 25/include/linux/mm.h~add-map_populate-sys_remap_file_pages-support-to-xfs	2005-01-16 14:43:08.642944208 -0800
+++ 25-akpm/include/linux/mm.h	2005-01-16 14:43:08.648943296 -0800
@@ -756,7 +756,9 @@ extern unsigned long page_unuse(struct p
 extern void truncate_inode_pages(struct address_space *, loff_t);
 
 /* generic vm_area_ops exported for stackable file systems */
-struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
+extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
+extern int filemap_populate(struct vm_area_struct *, unsigned long,
+		unsigned long, pgprot_t, unsigned long, int);
 
 /* mm/page-writeback.c */
 int write_one_page(struct page *page, int wait);
diff -puN mm/filemap.c~add-map_populate-sys_remap_file_pages-support-to-xfs mm/filemap.c
--- 25/mm/filemap.c~add-map_populate-sys_remap_file_pages-support-to-xfs	2005-01-16 14:43:08.644943904 -0800
+++ 25-akpm/mm/filemap.c	2005-01-16 14:43:08.650942992 -0800
@@ -1458,12 +1458,9 @@ err:
 	return NULL;
 }
 
-static int filemap_populate(struct vm_area_struct *vma,
-			unsigned long addr,
-			unsigned long len,
-			pgprot_t prot,
-			unsigned long pgoff,
-			int nonblock)
+int filemap_populate(struct vm_area_struct *vma, unsigned long addr,
+		unsigned long len, pgprot_t prot, unsigned long pgoff,
+		int nonblock)
 {
 	struct file *file = vma->vm_file;
 	struct address_space *mapping = file->f_mapping;
@@ -1505,6 +1502,7 @@ repeat:
 
 	return 0;
 }
+EXPORT_SYMBOL(filemap_populate);
 
 struct vm_operations_struct generic_file_vm_ops = {
 	.nopage		= filemap_nopage,
_
