linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@canonical.com>
Cc: Jens Axboe <axboe@fb.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	linux-btrfs@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"open list:FILESYSTEMS (VFS and infrastructure)" 
	<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] fs: direct-io: call .bi_end_io via bio_endio()
Date: Mon, 2 May 2016 07:50:02 -0700	[thread overview]
Message-ID: <20160502145002.GB20589@infradead.org> (raw)
In-Reply-To: <1461805789-3632-2-git-send-email-ming.lei@canonical.com>

On Thu, Apr 28, 2016 at 09:09:48AM +0800, Ming Lei wrote:
> bio_endio() is the graceful way to complete one bio.



> 
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
>  fs/direct-io.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/direct-io.c b/fs/direct-io.c
> index a8dd60a..0a35e51 100644
> --- a/fs/direct-io.c
> +++ b/fs/direct-io.c
> @@ -350,15 +350,10 @@ static void dio_bio_end_io(struct bio *bio)
>   */
>  void dio_end_io(struct bio *bio, int error)
>  {
> -	struct dio *dio = bio->bi_private;
> -
>  	if (!bio->bi_error)
>  		bio->bi_error = error;
>  
> -	if (dio->is_async)
> -		dio_bio_end_aio(bio);
> -	else
> -		dio_bio_end_io(bio);
> +	bio_endio(bio);
>  }
>  EXPORT_SYMBOL_GPL(dio_end_io);

dio_end_io is only used by btrfs.  So instead of this and the previous
patch you should just open code the error assignment and call to
bio_endio in btrfs.

  reply	other threads:[~2016-05-02 14:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28  1:09 [PATCH v3 1/3] fs: direct-io: handle error in dio_end_io() Ming Lei
2016-04-28  1:09 ` [PATCH v3 2/3] fs: direct-io: call .bi_end_io via bio_endio() Ming Lei
2016-05-02 14:50   ` Christoph Hellwig [this message]
2016-05-03  1:26     ` Ming Lei
2016-04-28  1:09 ` [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively Ming Lei
2016-04-28 15:29   ` Mikulas Patocka
2016-04-28 15:52     ` Ming Lei
2016-04-28 15:58       ` Mikulas Patocka
2016-04-28 16:12         ` Ming Lei
2016-04-28 16:59           ` Mikulas Patocka
2016-04-29  5:50             ` Ming Lei
2016-04-29  8:39               ` Mikulas Patocka
2016-04-29  9:33                 ` Ming Lei
2016-04-29  9:59                   ` Mikulas Patocka
2016-05-02 16:22   ` Jens Axboe

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=20160502145002.GB20589@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).