summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-01-09 09:39:02 -0500
committerDavid Sterba <dsterba@suse.com>2017-02-14 09:50:49 -0500
commit3ba7ab220e8918176c6f38ee09df86150aca1611 (patch)
treecfc9c4299f03ae428f4ba3ab7bda2ab0e41a0c68 /fs/btrfs/inode.c
parent18dc22c19bef520cca11ce4c0807ac9dec48d31f (diff)
btrfs: fix up misleading GFP_NOFS usage in btrfs_releasepage
b335b0034e25 ("Btrfs: Avoid using __GFP_HIGHMEM with slab allocator") has reduced the allocation mask in btrfs_releasepage to GFP_NOFS just to prevent from giving an unappropriate gfp mask to the slab allocator deeper down the callchain (in alloc_extent_state). This is wrong for two reasons a) GFP_NOFS might be just too restrictive for the calling context b) it is better to tweak the gfp mask down when it needs that. So just remove the mask tweaking from btrfs_releasepage and move it down to alloc_extent_state where it is needed. Signed-off-by: Michal Hocko <mhocko@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1e861a063721..ed9e04990bec 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8831,7 +8831,7 @@ static int btrfs_releasepage(struct page *page, gfp_t gfp_flags)
8831{ 8831{
8832 if (PageWriteback(page) || PageDirty(page)) 8832 if (PageWriteback(page) || PageDirty(page))
8833 return 0; 8833 return 0;
8834 return __btrfs_releasepage(page, gfp_flags & GFP_NOFS); 8834 return __btrfs_releasepage(page, gfp_flags);
8835} 8835}
8836 8836
8837static void btrfs_invalidatepage(struct page *page, unsigned int offset, 8837static void btrfs_invalidatepage(struct page *page, unsigned int offset,