Re: [RFC -v2 7/8] btrfs: Prevent from early transaction abort

From: Michal Hocko
Date: Tue Aug 18 2015 - 07:02:17 EST


On Tue 18-08-15 12:40:31, Michal Hocko wrote:
[...]
> @@ -4867,9 +4865,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);
> - if (!p)
> - goto free_eb;
> + p = find_or_create_page(mapping, index, GFP_NOFS|__GFP_NOFAIL);
>
> spin_lock(&mapping->private_lock);
> if (PagePrivate(p)) {

Same here. find_or_create_page might return NULL.
---