aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 538f65a79ec5..24fd75bb0f96 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -843,6 +843,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
843 int i_done; 843 int i_done;
844 struct btrfs_ordered_extent *ordered; 844 struct btrfs_ordered_extent *ordered;
845 struct extent_state *cached_state = NULL; 845 struct extent_state *cached_state = NULL;
846 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
846 847
847 if (isize == 0) 848 if (isize == 0)
848 return 0; 849 return 0;
@@ -860,7 +861,7 @@ again:
860 for (i = 0; i < num_pages; i++) { 861 for (i = 0; i < num_pages; i++) {
861 struct page *page; 862 struct page *page;
862 page = find_or_create_page(inode->i_mapping, 863 page = find_or_create_page(inode->i_mapping,
863 start_index + i, GFP_NOFS); 864 start_index + i, mask);
864 if (!page) 865 if (!page)
865 break; 866 break;
866 867