Message ID | 1438768284-30927-8-git-send-email-mhocko@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Wed, Aug 05, 2015 at 11:51:23AM +0200, mhocko@kernel.org wrote: > From: Michal Hocko <mhocko@suse.com> ... > Fix this by reintroducing the no-fail behavior of this allocation path > with the explicit __GFP_NOFAIL. > > Signed-off-by: Michal Hocko <mhocko@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c374e1e71e5f..88fad7051e38 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4607,7 +4607,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, { struct extent_buffer *eb = NULL; - eb = kmem_cache_zalloc(extent_buffer_cache, GFP_NOFS); + eb = kmem_cache_zalloc(extent_buffer_cache, GFP_NOFS|__GFP_NOFAIL); if (eb == NULL) return NULL; eb->start = start; @@ -4867,7 +4867,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info, return NULL; for (i = 0; i < num_pages; i++, index++) { - p = find_or_create_page(mapping, index, GFP_NOFS); + p = find_or_create_page(mapping, index, GFP_NOFS|__GFP_NOFAIL); if (!p) goto free_eb;