include/linux/fs.h | 1 + mm/filemap.c | 3 +++ 2 files changed, 4 insertions(+) --- linux-2.6.0-test3-l25/include/linux/fs.h~removepage-2.6.0 2003-09-05 15:31:52.000000000 -0700 +++ linux-2.6.0-test3-l25-zab/include/linux/fs.h 2003-09-08 10:47:30.000000000 -0700 @@ -311,6 +311,7 @@ struct address_space_operations { int (*releasepage) (struct page *, int); int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, loff_t offset, unsigned long nr_segs); + void (*removepage)(struct page *); /* called when page gets removed from the inode */ }; struct backing_dev_info; --- linux-2.6.0-test3-l25/mm/filemap.c~removepage-2.6.0 2003-08-08 21:34:39.000000000 -0700 +++ linux-2.6.0-test3-l25-zab/mm/filemap.c 2003-09-08 10:48:10.000000000 -0700 @@ -81,6 +81,9 @@ void __remove_from_page_cache(struct pag { struct address_space *mapping = page->mapping; + if (mapping->a_ops->removepage) + mapping->a_ops->removepage(page); + radix_tree_delete(&mapping->page_tree, page->index); list_del(&page->list); page->mapping = NULL; _