mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
Btrfs: don't bug on enomem in readpage
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>
This commit is contained in:
parent
15e3004a0e
commit
edd33c99c4
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue