Skip to content

Commit

Permalink
Btrfs: don't bug on enomem in readpage
Browse files Browse the repository at this point in the history
Get rid of the BUG_ON(ret == -ENOMEM) in __extent_read_full_page.  Thanks,

Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Oct 9, 2012
1 parent 15e3004 commit edd33c9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2751,12 +2751,15 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
end_bio_extent_readpage, mirror_num,
*bio_flags,
this_bio_flag);
BUG_ON(ret == -ENOMEM);
nr++;
*bio_flags = this_bio_flag;
if (!ret) {
nr++;
*bio_flags = this_bio_flag;
}
}
if (ret)
if (ret) {
SetPageError(page);
unlock_extent(tree, cur, cur + iosize - 1);
}
cur = cur + iosize;
pg_offset += iosize;
}
Expand Down

0 comments on commit edd33c9

Please sign in to comment.