From: Christoph Hellwig filemap_populate needs to be exported so that filesystems with their own vm_operations (like XFS) can use it. Signed-off-by: Andrew Morton --- 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-23 14:47:40.102100720 -0800 +++ 25-akpm/fs/xfs/linux-2.6/xfs_file.c 2005-01-23 14:47:40.108099808 -0800 @@ -531,6 +531,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-23 14:47:40.103100568 -0800 +++ 25-akpm/include/linux/mm.h 2005-01-23 14:47:40.110099504 -0800 @@ -762,7 +762,9 @@ extern void truncate_inode_pages_range(s loff_t lstart, loff_t lend); /* 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-23 14:47:40.105100264 -0800 +++ 25-akpm/mm/filemap.c 2005-01-23 14:47:40.111099352 -0800 @@ -1485,12 +1485,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; @@ -1532,6 +1529,7 @@ repeat: return 0; } +EXPORT_SYMBOL(filemap_populate); /* * pass notification that a page is becoming writable up to the filesystem _