Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864AbcD1BKK (ORCPT ); Wed, 27 Apr 2016 21:10:10 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35250 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbcD1BKF (ORCPT ); Wed, 27 Apr 2016 21:10:05 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , linux-btrfs@vger.kernel.org, Ming Lei , Alexander Viro , linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)) Subject: [PATCH v3 2/3] fs: direct-io: call .bi_end_io via bio_endio() Date: Thu, 28 Apr 2016 09:09:48 +0800 Message-Id: <1461805789-3632-2-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461805789-3632-1-git-send-email-ming.lei@canonical.com> References: <1461805789-3632-1-git-send-email-ming.lei@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 651 Lines: 30 bio_endio() is the graceful way to complete one bio. Signed-off-by: Ming Lei --- 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); -- 1.9.1