Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c +++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c @@ -342,6 +342,7 @@ xfs_probe_unwritten_page( out: unlock_page(page); + page_cache_release(page); return NULL; } @@ -382,6 +383,7 @@ xfs_probe_unmapped_page( out: unlock_page(page); + page_cache_release(page); return ret; } @@ -464,6 +466,7 @@ xfs_probe_delalloc_page( out: unlock_page(page); + page_cache_release(page); return NULL; } @@ -598,6 +601,7 @@ xfs_submit_page( if (probed_page && clear_dirty) wbc->nr_to_write--; /* Wrote an "extra" page */ } + page_cache_release(page); } /* @@ -686,6 +690,7 @@ xfs_convert_page( xfs_submit_page(page, wbc, bh_arr, index, 1, !page_dirty); } else { unlock_page(page); + page_cache_release(page); } } Index: linux-2.6/mm/filemap.c =================================================================== --- linux-2.6.orig/mm/filemap.c +++ linux-2.6/mm/filemap.c @@ -556,7 +556,7 @@ struct page * find_get_page(struct addre EXPORT_SYMBOL(find_get_page); /* - * Same as above, but trylock it instead of incrementing the count. + * Same as above, but trylock it as well. */ struct page *find_trylock_page(struct address_space *mapping, unsigned long offset) { @@ -572,8 +572,6 @@ struct page *find_trylock_page(struct ad goto out_failed; } - /* Silly interface requires us to drop the refcount */ - __put_page(page); return page; out_failed: Index: linux-2.6/mm/swapfile.c =================================================================== --- linux-2.6.orig/mm/swapfile.c +++ linux-2.6/mm/swapfile.c @@ -387,7 +387,6 @@ void free_swap_and_cache(swp_entry_t ent int one_user; BUG_ON(PagePrivate(page)); - page_cache_get(page); one_user = (page_count(page) == 2); /* Only cache user (+us), or swap space full? Free it! */ if (!PageWriteback(page) && (one_user || vm_swap_full())) {