From 2575f0eae3b2f7c1e05d27cd3ba9214d9dec1c78 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 25 Jul 2007 20:36:27 -0700 Subject: [PATCH] vps_filesystem_reiserfs mapping_set_gfp_mask only works on order 0 page cache operations. Reiserfs can use 8k pages (order 1). Replace the mapping_set_gfp_mask with mapping_setup to make this work properly. Signed-off-by: Christoph Lameter --- fs/reiserfs/xattr.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index ccfd710..14bf601 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -405,9 +405,10 @@ static struct page *reiserfs_get_page(struct inode *dir, unsigned long n) { struct address_space *mapping = dir->i_mapping; struct page *page; + /* We can deadlock if we try to free dentries, and an unlink/rmdir has just occured - GFP_NOFS avoids this */ - mapping_set_gfp_mask(mapping, GFP_NOFS); + mapping_setup(mapping, GFP_NOFS, page_cache_shift(mapping)); page = read_mapping_page(mapping, n, NULL); if (!IS_ERR(page)) { kmap(page); -- 1.4.4.4