Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c387ab2 authored by Miao Xie's avatar Miao Xie Committed by Chris Mason
Browse files

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: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent c1dc0896
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2348,6 +2348,11 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
	ret = tree->ops->submit_bio_hook(inode, read_mode, bio,
					 failrec->this_mirror,
					 failrec->bio_flags, 0);
	if (ret) {
		free_io_failure(inode, failrec, 0);
		bio_put(bio);
	}

	return ret;
}