Skip to content

Commit e8f5b39

Browse files
committed
btrfs: btrfs_create_repair_bio never fails, skip error handling
As the function uses the non-failing bio allocation, we can remove error handling from the callers as well. Signed-off-by: David Sterba <[email protected]> Reviewed-by: Liu Bo <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent c09abff commit e8f5b39

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

fs/btrfs/extent_io.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,10 +2394,6 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
23942394
start - page_offset(page),
23952395
(int)phy_offset, failed_bio->bi_end_io,
23962396
NULL);
2397-
if (!bio) {
2398-
free_io_failure(failure_tree, tree, failrec);
2399-
return -EIO;
2400-
}
24012397
bio_set_op_attrs(bio, REQ_OP_READ, read_mode);
24022398

24032399
btrfs_debug(btrfs_sb(inode->i_sb),

fs/btrfs/inode.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8017,10 +8017,6 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
80178017
isector >>= inode->i_sb->s_blocksize_bits;
80188018
bio = btrfs_create_repair_bio(inode, failed_bio, failrec, page,
80198019
pgoff, isector, repair_endio, repair_arg);
8020-
if (!bio) {
8021-
free_io_failure(failure_tree, io_tree, failrec);
8022-
return -EIO;
8023-
}
80248020
bio_set_op_attrs(bio, REQ_OP_READ, read_mode);
80258021

80268022
btrfs_debug(BTRFS_I(inode)->root->fs_info,

0 commit comments

Comments
 (0)