Index: linux-2.6.17-rc4-mm3/mm/truncate.c =================================================================== --- linux-2.6.17-rc4-mm3.orig/mm/truncate.c 2006-05-23 15:10:22.496223514 -0700 +++ linux-2.6.17-rc4-mm3/mm/truncate.c 2006-05-24 11:57:21.696541765 -0700 @@ -15,6 +15,7 @@ #include /* grr. try_to_release_page, do_invalidatepage */ +#include static inline void truncate_partial_page(struct page *page, unsigned partial) { @@ -218,7 +219,7 @@ EXPORT_SYMBOL(truncate_inode_pages); * pagetables. */ unsigned long invalidate_mapping_pages(struct address_space *mapping, - pgoff_t start, pgoff_t end) + pgoff_t start, pgoff_t end, const nodemask_t *nodes) { struct pagevec pvec; pgoff_t next = start; @@ -248,6 +249,8 @@ unsigned long invalidate_mapping_pages(s if (lock_failed) continue; + if (nodes && !node_isset(page_to_nid(page), *nodes)) + goto unlock; if (PageDirty(page) || PageWriteback(page)) goto unlock; if (page_mapped(page)) @@ -263,9 +266,9 @@ unlock: return ret; } -unsigned long invalidate_inode_pages(struct address_space *mapping) +unsigned long invalidate_inode_pages(struct address_space *mapping, const nodemask_t *nodes) { - return invalidate_mapping_pages(mapping, 0, ~0UL); + return invalidate_mapping_pages(mapping, 0, ~0UL, nodes); } EXPORT_SYMBOL(invalidate_inode_pages); Index: linux-2.6.17-rc4-mm3/include/linux/fs.h =================================================================== --- linux-2.6.17-rc4-mm3.orig/include/linux/fs.h 2006-05-23 15:10:21.451366344 -0700 +++ linux-2.6.17-rc4-mm3/include/linux/fs.h 2006-05-24 11:55:46.788344855 -0700 @@ -1472,13 +1472,13 @@ extern int invalidate_inodes(struct supe extern int __invalidate_device(struct block_device *); extern int invalidate_partition(struct gendisk *, int); unsigned long invalidate_mapping_pages(struct address_space *mapping, - pgoff_t start, pgoff_t end); -unsigned long invalidate_inode_pages(struct address_space *mapping); + pgoff_t start, pgoff_t end, const nodemask_t *nodes); +unsigned long invalidate_inode_pages(struct address_space *mapping, const nodemask_t *nodes); static inline void invalidate_remote_inode(struct inode *inode) { if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) - invalidate_inode_pages(inode->i_mapping); + invalidate_inode_pages(inode->i_mapping, NULL); } extern int invalidate_inode_pages2(struct address_space *mapping); extern int invalidate_inode_pages2_range(struct address_space *mapping,