Whamcloud - gitweb
file loop-sync-2.4.21-suse.patch was initially added on branch b1_2_smallfix.
[fs/lustre-release.git] / lustre / kernel_patches / patches / removepage-vanilla-2.6.5.patch
1  include/linux/fs.h |    1 +
2  mm/filemap.c       |    3 +++
3  2 files changed, 4 insertions(+)
4
5 Index: linux-2.6.4-30.1/include/linux/fs.h
6 ===================================================================
7 --- linux-2.6.4-30.1.orig/include/linux/fs.h    2004-04-02 03:20:19.000000000 -0500
8 +++ linux-2.6.4-30.1/include/linux/fs.h 2004-04-02 03:20:19.000000000 -0500
9 @@ -320,6 +320,7 @@
10         int (*releasepage) (struct page *, int);
11         int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
12                         loff_t offset, unsigned long nr_segs);
13 +       void (*removepage)(struct page *); /* called when page gets removed from the inode */
14  };
15  
16  struct backing_dev_info;
17 Index: linux-2.6.4-30.1/mm/filemap.c
18 ===================================================================
19 --- linux-2.6.4-30.1.orig/mm/filemap.c  2004-04-02 03:19:42.000000000 -0500
20 +++ linux-2.6.4-30.1/mm/filemap.c       2004-04-02 03:23:10.000000000 -0500
21 @@ -102,6 +102,9 @@
22  {
23         struct address_space *mapping = page->mapping;
24  
25 +       if (mapping->a_ops->removepage)
26 +               mapping->a_ops->removepage(page);
27 +
28         radix_tree_delete(&mapping->page_tree, page->index);
29         list_del(&page->list);
30         page->mapping = NULL;
31