From mboxrd@z Thu Jan 1 00:00:00 1970 From: clameter@sgi.com Subject: [37/37] Reiserfs: Fix up for mapping_set_gfp_mask Date: Wed, 20 Jun 2007 11:29:44 -0700 Message-ID: <20070620183014.699765111@sgi.com> References: <20070620182907.506775016@sgi.com> Cc: Christoph Hellwig , Mel Gorman To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:46753 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758252AbXFTSaP (ORCPT ); Wed, 20 Jun 2007 14:30:15 -0400 Cc: William Lee Irwin III , David Chinner Cc: Jens Axboe , Badari Pulavarty Cc: Maxim Levitsky Content-Disposition: inline; filename=vps_filesystem_reiserfs Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6.22-rc4-mm2/fs/reiserfs/xattr.c =================================================================== --- linux-2.6.22-rc4-mm2.orig/fs/reiserfs/xattr.c 2007-06-19 23:54:38.000000000 -0700 +++ linux-2.6.22-rc4-mm2/fs/reiserfs/xattr.c 2007-06-19 23:56:40.000000000 -0700 @@ -405,9 +405,10 @@ static struct page *reiserfs_get_page(st { 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); --