diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-10-05 22:40:32 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-09 15:20:31 +0200 |
commit | edd33c99c4ba26ebe17c1a3d65b4aba25482ed32 (patch) | |
tree | 6fb9527654ea67ee9ff648e56f61f2ad8eeeddd1 /fs/btrfs | |
parent | Btrfs: cleanup pages properly when ENOMEM in compression (diff) | |
download | linux-edd33c99c4ba26ebe17c1a3d65b4aba25482ed32.tar.xz linux-edd33c99c4ba26ebe17c1a3d65b4aba25482ed32.zip |
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')
-rw-r--r-- | fs/btrfs/extent_io.c | 11 |
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, 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; } |