From: David Sterba Date: Thu, 13 Jul 2017 15:42:15 +0000 (+0200) Subject: btrfs: btrfs_create_repair_bio never fails, skip error handling X-Git-Tag: MMI-PSA29.97-13-9~5062^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8f5b395d5332b5d720d62d33d6e06836392fd85;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Liu Bo Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a3122fba54e8..3a9ef02cad49 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2394,10 +2394,6 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset, start - page_offset(page), (int)phy_offset, failed_bio->bi_end_io, NULL); - if (!bio) { - free_io_failure(failure_tree, tree, failrec); - return -EIO; - } bio_set_op_attrs(bio, REQ_OP_READ, read_mode); btrfs_debug(btrfs_sb(inode->i_sb), diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 529437c337b4..eb495e956d53 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8017,10 +8017,6 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio, isector >>= inode->i_sb->s_blocksize_bits; bio = btrfs_create_repair_bio(inode, failed_bio, failrec, page, pgoff, isector, repair_endio, repair_arg); - if (!bio) { - free_io_failure(failure_tree, io_tree, failrec); - return -EIO; - } bio_set_op_attrs(bio, REQ_OP_READ, read_mode); btrfs_debug(BTRFS_I(inode)->root->fs_info,