Message ID | 1461805789-3632-2-git-send-email-ming.lei@canonical.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
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. -- 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
On Mon, May 2, 2016 at 10:50 PM, Christoph Hellwig <hch@infradead.org> wrote: > 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. OK. Thanks, -- 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
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);
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(-)