From patchwork Wed Apr 27 03:51:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8952181 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 963F1BF29F for ; Wed, 27 Apr 2016 03:52:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 904252013A for ; Wed, 27 Apr 2016 03:51:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C67C32011B for ; Wed, 27 Apr 2016 03:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752927AbcD0Dvw (ORCPT ); Tue, 26 Apr 2016 23:51:52 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33074 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752904AbcD0Dvv (ORCPT ); Tue, 26 Apr 2016 23:51:51 -0400 Received: by mail-pf0-f196.google.com with SMTP id e190so3710376pfe.0; Tue, 26 Apr 2016 20:51:50 -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; bh=65ouTF7IHSbuNBON4LUKdUPdJFxHrna1dPiIgmm+6vs=; b=dSlYh7+pRVPcKcCAu/dM5eEXbdxI2QlCfSvsAyNuUh5BNjT3OwUUw/eVL9CThNfXCP 3RB7+aW1glnXmKIU9T85TIPnyBhG4ecFoXdUKTj9iKAb37cUtQYCbImfHE9sNyQa2PSy lQykkxxIMwzuDLZcbyIhRrwp7qv6rRuEoNRFJkwkSbY0tXoDSDfVYb7iibTkztktPynY DvV9VyZSqyrvGngENS0AJjs7hle7NZXUy0HP7Hx+nIj77JkMDKEg5hpaCzzsqWTcYwov 2942LC1tALe3M+9qG8UV++qqfuurHhflQblEZIhPVWcDpJKGJWwF1gNQLMcHvv2LxsQN v6Hg== X-Gm-Message-State: AOPr4FWMU5nb5RNrEvtj7TVMt37+jqqgoeNeMGXZTFtWeTeNEkK3gHr5oy8g8mq/cRgiAQ== X-Received: by 10.98.26.205 with SMTP id a196mr8587125pfa.46.1461729110120; Tue, 26 Apr 2016 20:51:50 -0700 (PDT) Received: from localhost ([14.153.220.45]) by smtp.gmail.com with ESMTPSA id i1sm1948923pfj.17.2016.04.26.20.51.49 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 26 Apr 2016 20:51:49 -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 v2 2/3] fs: direct-io: call .bi_end_io via bio_endio() Date: Wed, 27 Apr 2016 11:51:46 +0800 Message-Id: <1461729106-22944-1-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 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=ham 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);