summaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-07-11 10:47:06 -0400
committerChris Mason <chris.mason@oracle.com>2011-07-27 12:46:43 -0400
commita94733d0bc630edaedc6ca156752dd5a7cb82521 (patch)
tree3f0bd508aa1ce5894e43df45bb73031a380ed8f5 /fs/btrfs/ioctl.c
parentbab39bf998133510f2dad08158006197ec0dabea (diff)
downloadlinux-3.10-a94733d0bc630edaedc6ca156752dd5a7cb82521.tar.gz
linux-3.10-a94733d0bc630edaedc6ca156752dd5a7cb82521.tar.bz2
linux-3.10-a94733d0bc630edaedc6ca156752dd5a7cb82521.zip
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/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a3c4751e07d..09c9a8d26ee 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -867,8 +867,8 @@ again:
/* step one, lock all the pages */
for (i = 0; i < num_pages; i++) {
struct page *page;
- page = grab_cache_page(inode->i_mapping,
- start_index + i);
+ page = find_or_create_page(inode->i_mapping,
+ start_index + i, GFP_NOFS);
if (!page)
break;