diff options
author | Josef Bacik <josef@redhat.com> | 2011-07-11 10:47:06 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-07-27 12:46:43 -0400 |
commit | a94733d0bc630edaedc6ca156752dd5a7cb82521 (patch) | |
tree | 3f0bd508aa1ce5894e43df45bb73031a380ed8f5 /fs/btrfs/relocation.c | |
parent | bab39bf998133510f2dad08158006197ec0dabea (diff) |
Btrfs: use find_or_create_page instead of grab_cache_page
grab_cache_page will use mapping_gfp_mask(), which for all inodes is set to
GFP_HIGHUSER_MOVABLE. So instead use find_or_create_page in all cases where we
need GFP_NOFS so we don't deadlock. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 086b1e6b8614..41d76c60876f 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2955,7 +2955,8 @@ static int relocate_file_extent_cluster(struct inode *inode, | |||
2955 | page_cache_sync_readahead(inode->i_mapping, | 2955 | page_cache_sync_readahead(inode->i_mapping, |
2956 | ra, NULL, index, | 2956 | ra, NULL, index, |
2957 | last_index + 1 - index); | 2957 | last_index + 1 - index); |
2958 | page = grab_cache_page(inode->i_mapping, index); | 2958 | page = find_or_create_page(inode->i_mapping, index, |
2959 | GFP_NOFS); | ||
2959 | if (!page) { | 2960 | if (!page) { |
2960 | btrfs_delalloc_release_metadata(inode, | 2961 | btrfs_delalloc_release_metadata(inode, |
2961 | PAGE_CACHE_SIZE); | 2962 | PAGE_CACHE_SIZE); |