aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-05 16:40:32 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-09 09:20:31 -0400
commitedd33c99c4ba26ebe17c1a3d65b4aba25482ed32 (patch)
tree6fb9527654ea67ee9ff648e56f61f2ad8eeeddd1 /fs/btrfs/extent_io.c
parent15e3004a0eb2c4879bc666d0e6a3acd973fb226c (diff)
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>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b82d244a2ef5..8c37cb64be7a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2751,12 +2751,15 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2751 end_bio_extent_readpage, mirror_num, 2751 end_bio_extent_readpage, mirror_num,
2752 *bio_flags, 2752 *bio_flags,
2753 this_bio_flag); 2753 this_bio_flag);
2754 BUG_ON(ret == -ENOMEM); 2754 if (!ret) {
2755 nr++; 2755 nr++;
2756 *bio_flags = this_bio_flag; 2756 *bio_flags = this_bio_flag;
2757 }
2757 } 2758 }
2758 if (ret) 2759 if (ret) {
2759 SetPageError(page); 2760 SetPageError(page);
2761 unlock_extent(tree, cur, cur + iosize - 1);
2762 }
2760 cur = cur + iosize; 2763 cur = cur + iosize;
2761 pg_offset += iosize; 2764 pg_offset += iosize;
2762 } 2765 }