From patchwork Tue Dec 27 16:04:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 63180601D2 for ; Tue, 27 Dec 2016 16:14:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54F17201BC for ; Tue, 27 Dec 2016 16:14:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49CE425E13; Tue, 27 Dec 2016 16:14:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5FF8201BC for ; Tue, 27 Dec 2016 16:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932974AbcL0QNo (ORCPT ); Tue, 27 Dec 2016 11:13:44 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36546 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932860AbcL0QGQ (ORCPT ); Tue, 27 Dec 2016 11:06:16 -0500 Received: by mail-pf0-f193.google.com with SMTP id c4so18358824pfb.3; Tue, 27 Dec 2016 08:06:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fqa6NhX0lTXoXAfCyGWK6m5xZH+JW56BiSKG5YVOlI4=; b=s7wLxbtllkCkd7f/+/C8ZHT4TZAWHkLgcyJ2C08l0TzqLTaycp8VT0rryuiREAusw/ sGM4Pe1o1q534SyeaKCErm3YLDf0rIUzgqfE+EDFEURBIpTagUW4RezokxSY2oyU7A/B G3HSz18vR0EnBKhZATijIxOezxQ1o/sppCCcwgwr4B17kBtRaGdnTB9UG4ly0vrFgRtE YxRAWnzMNnNSYYwnyG4M4TT0BXWMFJVhKhuM7UjpB0pakPrKHxzaQdqFRXnXj9LSJHqT qs4DdId0nW3+osYCx51bRKODvNn6t/WHUQ6mMKXATtgDjFzXOEqJB8MHk7X3qO8HPz6Z f+4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fqa6NhX0lTXoXAfCyGWK6m5xZH+JW56BiSKG5YVOlI4=; b=pLCP7oSZ9WrOhX8CRrxvlC1aZTvi/E3Q9gFbnPOwiT0jhnIuKKmqMiOsR2Pqkhx7hC e1hSXNosfSxjniXA5apN+D5IciC5EyFk7G7jbnWxdKYFmcJQG52LtY535Ag2EWln42rG aDN4yvJDJy6Qt9IRPTNRIPtM/raVJHpQvyy4aTHXHjiE3DrVPMFgvumyOAQdXMrslC2Z tzulcdhPemkHcdMpChx4LqEtJu5NFyBDBY+GNHIDLwXipTHeGJvwO9UvtN8gHeyVJeid nyf3StDg21xBg/4RTxdl60KDhRO+679uw58+X3EQQmSaeGKQOu4qKVTJVKtchFfc1NAQ 6tNw== X-Gm-Message-State: AIkVDXICmNBodbd9O8XGl3hZZA/ZfIBbhpDtyT4kVK9/mK2QFaj2l62z78pLdMameoCHAw== X-Received: by 10.99.229.17 with SMTP id r17mr59600808pgh.149.1482854775336; Tue, 27 Dec 2016 08:06:15 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id q23sm42752916pfg.47.2016.12.27.08.06.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:06:14 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Alexander Viro , linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)) Subject: [PATCH v1 40/54] fs/direct-io: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:49 +0800 Message-Id: <1482854706-14128-9-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- fs/direct-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index aeae8c063451..e2ecd9fbbffb 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -487,7 +487,9 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) err = bio->bi_error; bio_check_pages_dirty(bio); /* transfers ownership */ } else { - bio_for_each_segment_all(bvec, bio, i) { + struct bvec_iter_all bia; + + bio_for_each_segment_all_sp(bvec, bio, i, bia) { struct page *page = bvec->bv_page; if (dio->op == REQ_OP_READ && !PageCompound(page) &&