From patchwork Mon Nov 26 02:17:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10697315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5DF81750 for ; Mon, 26 Nov 2018 02:18:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B46D129889 for ; Mon, 26 Nov 2018 02:18:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6D692995C; Mon, 26 Nov 2018 02:18:40 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98DFE29889 for ; Mon, 26 Nov 2018 02:18:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C2F346B3F6C; Sun, 25 Nov 2018 21:18:38 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C055A6B3F6D; Sun, 25 Nov 2018 21:18:38 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACCEF6B3F6E; Sun, 25 Nov 2018 21:18:38 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by kanga.kvack.org (Postfix) with ESMTP id 8028E6B3F6C for ; Sun, 25 Nov 2018 21:18:38 -0500 (EST) Received: by mail-qt1-f199.google.com with SMTP id z6so15254709qtj.21 for ; Sun, 25 Nov 2018 18:18:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=ppLexaBx3GlwO/Rrt5sG9akfv80BsODE54PFkogFcPM=; b=f/XzIQzMC47qXvasMOH2x7lep6xLbL7Ieq2fA98avCT/g0GDKpEFiNA4VMYofWPX8f 61d5k+tUov+8386KDO9mkMT/OlAr/WUmnL/ryuAYSpYKtOCxbSPRtcnOaDyn5IQw+0j/ 30Lc6FAOGm3Nyv1V10lM+t0pxCfrb1bDH11qaRKaruVKBqJogFM5d5yTWK9i/lV9gsXZ 15AwGIesHLPlocenB3qrvF6ysPnbDfv+nza+j7gAcG+UNCFbUdsMvqjqzkBCIwcFK791 Nc3gH9SSWvGMM6AZ2exRLYnJemuV6h5AEOiiBhfq6u7ZhYG2MpnxPfu95LRLMj0lsdx8 CS8Q== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWb/e5MA+APDyirg23LENgi2kwMoXPJpiI70b8/92lO0dBqpHzz0 ZjzPAEOy67GwvtwCzsHZZT7D/zoTzuy52W8a4nlyjmcFhVI+9PmZ+IC/lvw5bGGFNXxVBqmvkXU lHxfXKpr/MCFVz0+lMaxXSy6IqVgJ5AATlm4SUCMj2g/ltYZi5u3OAHaOr5O6xtmsgg== X-Received: by 2002:ac8:7451:: with SMTP id h17mr20391766qtr.319.1543198718308; Sun, 25 Nov 2018 18:18:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/V1CS0DoJ8IT1MvsFltpz6YDW1Ug7miRU8X0oecRQtpsM7gR1s7LKtEkav+JbIr68tjCqd+ X-Received: by 2002:ac8:7451:: with SMTP id h17mr20391741qtr.319.1543198717589; Sun, 25 Nov 2018 18:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543198717; cv=none; d=google.com; s=arc-20160816; b=YeV5gBb+yxf1Yqb6AIMLEsTLDy63pDKFBhVIGh7mturOyHOJvH/0pE7Nm0Liy9yJUZ m1s/u8h6o8CHkYiK9T9eXJP+Wom8dB1T3IrsrTNqofgSgZzeQhXDLutD9417wMmxDPc/ hkezY412VTKcMtAQ6IIAQA0H4rf56TispXtz5BARpdB4TQdJv5TBk30sju3vQioiX/zt 9JOtoKSsMPBcfvaLx5BQNRT26COQQpk4VxKmyzOeVOel5G6cyhAUohA90PRTsTjwbdVz IfACkWqJJsrtBeLfcZpStpTjT3es5ZJ1nS115RI1Dl4Li8iOh76KJVMH7zV1W8s+PvZ6 lxYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=ppLexaBx3GlwO/Rrt5sG9akfv80BsODE54PFkogFcPM=; b=ylDCSrGfV4JUj4G8MTJhuajeXuAeQ1P2buNGm8xVCCnWiqydLnlkGKv7K+/NL2wKXH HTQn31ApSQ0ugAYcOylNsiG5oQUgXWHwG1Qe0GkMR4cCUwOeDR6WxFbTNQpquCD4VX79 8YAb24iu2f02hQoDdhCHhzx2jiEaOk8P8qxJeqjvmShZJ5w16NAE5+B3FygCiYG2V12z aP86odsbZUUscpLCN7BiHakhCMjJDjRCCGokq2UCsUGhdPH+KV0SaHXOihnpUrZyCskU WLTzkmJhMxX0fwR76OJbCG4JO4W3dIjXv5e3vZe/CM/2eGmwd9mK8AstWoG04QA43LN8 VmNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id q31si13155705qtj.66.2018.11.25.18.18.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Nov 2018 18:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 982B789AC5; Mon, 26 Nov 2018 02:18:36 +0000 (UTC) Received: from localhost (ovpn-8-19.pek2.redhat.com [10.72.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA9725C1B2; Mon, 26 Nov 2018 02:18:18 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , Omar Sandoval , Sagi Grimberg , Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Christoph Hellwig , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com, Ming Lei Subject: [PATCH V12 05/20] block: remove bvec_iter_rewind() Date: Mon, 26 Nov 2018 10:17:05 +0800 Message-Id: <20181126021720.19471-6-ming.lei@redhat.com> In-Reply-To: <20181126021720.19471-1-ming.lei@redhat.com> References: <20181126021720.19471-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 26 Nov 2018 02:18:36 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Commit 7759eb23fd980 ("block: remove bio_rewind_iter()") removes bio_rewind_iter(), then no one uses bvec_iter_rewind() any more, so remove it. Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval --- include/linux/bvec.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 02c73c6aa805..ba0ae40e77c9 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -92,30 +92,6 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv, return true; } -static inline bool bvec_iter_rewind(const struct bio_vec *bv, - struct bvec_iter *iter, - unsigned int bytes) -{ - while (bytes) { - unsigned len = min(bytes, iter->bi_bvec_done); - - if (iter->bi_bvec_done == 0) { - if (WARN_ONCE(iter->bi_idx == 0, - "Attempted to rewind iter beyond " - "bvec's boundaries\n")) { - return false; - } - iter->bi_idx--; - iter->bi_bvec_done = __bvec_iter_bvec(bv, *iter)->bv_len; - continue; - } - bytes -= len; - iter->bi_size += len; - iter->bi_bvec_done -= len; - } - return true; -} - #define for_each_bvec(bvl, bio_vec, iter, start) \ for (iter = (start); \ (iter).bi_size && \