From patchwork Thu Apr 28 01:09:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8964621 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0A9A0BF440 for ; Thu, 28 Apr 2016 01:11:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 571D12026D for ; Thu, 28 Apr 2016 01:11:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51F86201F5 for ; Thu, 28 Apr 2016 01:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753733AbcD1BKJ (ORCPT ); Wed, 27 Apr 2016 21:10:09 -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 Received: by mail-pf0-f196.google.com with SMTP id r187so7843946pfr.2; Wed, 27 Apr 2016 18:10:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=65ouTF7IHSbuNBON4LUKdUPdJFxHrna1dPiIgmm+6vs=; b=RgSMrgZn1lIM+2xZkFR1kKZ2oL2u/nRdvTxcawVi9+hQs4nZ+3TEDjT+yBIBnlQUAq tElHV/Sdss5VBMelbl6T9C+jXFbPj5/WN5zhSqYF7vWasefebGjQcjHKWu7U3Lu49Q9K jaGMOD5xRRmQo0iaFkuWlJ4LBaxkGRC7Re+n0eZnq6NRugGW7yHNK7BQ/l4iFghg/OyA 5gi6VVlnjMngZA0S7ZDUHtj2at27wj0RndAG+IuoDlxVPFMECrqQi6jzsLK5DxOBBadL 1qcs2ueHMnKz7V2i0ciiS8R6c3La/FZ4Upo1YThgtQpkLP6ZZwdLYKw8+fB1xQFRojsf y6dg== X-Gm-Message-State: AOPr4FUAtMC+DFP3nsT4bqox0uPCn+K+hWpQ2ndTDWmjxuDtQx7oG1cTrGd+H/VmFYsHmQ== X-Received: by 10.98.29.16 with SMTP id d16mr16282409pfd.142.1461805803766; Wed, 27 Apr 2016 18:10:03 -0700 (PDT) Received: from localhost ([103.192.227.7]) by smtp.gmail.com with ESMTPSA id vv8sm9933837pab.22.2016.04.27.18.10.01 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 27 Apr 2016 18:10:03 -0700 (PDT) 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);