]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: btrfs_create_repair_bio never fails, skip error handling
authorDavid Sterba <dsterba@suse.com>
Thu, 13 Jul 2017 15:42:15 +0000 (17:42 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 14 Jul 2017 18:42:08 +0000 (20:42 +0200)
As the function uses the non-failing bio allocation, we can remove error
handling from the callers as well.

Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/inode.c

index a3122fba54e8d51a5ca30b6f4b6a57955ce8df19..3a9ef02cad49e994d2c5cadfd6dfc4e8ee89b6f8 100644 (file)
@@ -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),
index 529437c337b49cffc441543c857f33fe05085a39..eb495e956d53ef80758b3c4331e98918be5367e7 100644 (file)
@@ -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,