提交 054ec2f6 编写于 作者: G Guoqing Jiang 提交者: David Sterba

btrfs: simplify code with bio_io_error

bio_io_error was introduced in the commit 4246a0b6
("block: add a bi_error field to struct bio"), so use it to simplify
code.
Signed-off-by: NGuoqing Jiang <gqjiang@suse.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 25ff17e8
......@@ -8647,8 +8647,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,
* callbacks - they require an allocated dip and a clone of dio_bio.
*/
if (bio && dip) {
bio->bi_error = -EIO;
bio_endio(bio);
bio_io_error(bio);
/*
* The end io callbacks free our dip, do the final put on bio
* and all the cleanup and final put for dio_bio (through
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册