Commit 013bd4c3 authored by Tsutomu Itoh's avatar Tsutomu Itoh Committed by David Sterba

Btrfs: fix return value check of extent_io_ops

This patch adds the check on the return value of extent_io_ops.
Signed-off-by: default avatarTsutomu Itoh <t-itoh@jp.fujitsu.com>
parent 12fc9d09
...@@ -2154,9 +2154,10 @@ static int bio_readpage_error(struct bio *failed_bio, struct page *page, ...@@ -2154,9 +2154,10 @@ static int bio_readpage_error(struct bio *failed_bio, struct page *page,
"this_mirror=%d, num_copies=%d, in_validation=%d\n", read_mode, "this_mirror=%d, num_copies=%d, in_validation=%d\n", read_mode,
failrec->this_mirror, num_copies, failrec->in_validation); failrec->this_mirror, num_copies, failrec->in_validation);
tree->ops->submit_bio_hook(inode, read_mode, bio, failrec->this_mirror, ret = tree->ops->submit_bio_hook(inode, read_mode, bio,
failrec->bio_flags, 0); failrec->this_mirror,
return 0; failrec->bio_flags, 0);
return ret;
} }
/* lots and lots of room for performance fixes in the end_bio funcs */ /* lots and lots of room for performance fixes in the end_bio funcs */
...@@ -2790,9 +2791,12 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -2790,9 +2791,12 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
delalloc_start = delalloc_end + 1; delalloc_start = delalloc_end + 1;
continue; continue;
} }
tree->ops->fill_delalloc(inode, page, delalloc_start, ret = tree->ops->fill_delalloc(inode, page,
delalloc_end, &page_started, delalloc_start,
&nr_written); delalloc_end,
&page_started,
&nr_written);
BUG_ON(ret);
/* /*
* delalloc_end is already one less than the total * delalloc_end is already one less than the total
* length, so we don't subtract one from * length, so we don't subtract one from
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment