aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-09-12 06:43:57 -0400
committerChris Mason <clm@fb.com>2014-09-17 16:38:54 -0400
commit6c387ab20db15f2bd448f7c508e2638101b16ea1 (patch)
tree52b1bbe1cb2d847f10e7b790ea96d73cc968cbdc
parentc1dc08967f69c6b5067f8302c600f6628123f3bf (diff)
Btrfs: fix missing error handler if submiting re-read bio fails
We forgot to free failure record and bio after submitting re-read bio failed, fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r--fs/btrfs/extent_io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index ad04f85ac45d..dc501a9ca227 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2348,6 +2348,11 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
2348 ret = tree->ops->submit_bio_hook(inode, read_mode, bio, 2348 ret = tree->ops->submit_bio_hook(inode, read_mode, bio,
2349 failrec->this_mirror, 2349 failrec->this_mirror,
2350 failrec->bio_flags, 0); 2350 failrec->bio_flags, 0);
2351 if (ret) {
2352 free_io_failure(inode, failrec, 0);
2353 bio_put(bio);
2354 }
2355
2351 return ret; 2356 return ret;
2352} 2357}
2353 2358