From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: btrfs_create_repair_bio never fails, skip error handling
Date: Thu, 13 Jul 2017 09:38:07 -0700 [thread overview]
Message-ID: <20170713163807.GD12913@lim.localdomain> (raw)
In-Reply-To: <20170713154215.20191-1-dsterba@suse.com>
On Thu, Jul 13, 2017 at 05:42:15PM +0200, David Sterba wrote:
> As it uses the non-failinig bio allocation, we can remove error handling
> from the callers as well.
>
Looks good.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
-liubo
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/extent_io.c | 4 ----
> fs/btrfs/inode.c | 4 ----
> 2 files changed, 8 deletions(-)
>
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 2e6f69908303..7010b7764e23 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 5d3c6ac960fd..97460e492d91 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,
> --
> 2.13.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-07-13 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 15:42 [PATCH] btrfs: btrfs_create_repair_bio never fails, skip error handling David Sterba
2017-07-13 16:38 ` Liu Bo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170713163807.GD12913@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).