From patchwork Thu Sep 14 13:18:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9953061 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 B3CA060230 for ; Thu, 14 Sep 2017 13:19:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D7B628CD3 for ; Thu, 14 Sep 2017 13:19:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 825D028D27; Thu, 14 Sep 2017 13:19:18 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 167D028CD3 for ; Thu, 14 Sep 2017 13:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbdINNTJ (ORCPT ); Thu, 14 Sep 2017 09:19:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:34084 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751407AbdINNSk (ORCPT ); Thu, 14 Sep 2017 09:18:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EA249AD07; Thu, 14 Sep 2017 13:18:37 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id D8DE81E3485; Thu, 14 Sep 2017 15:18:36 +0200 (CEST) From: Jan Kara To: Cc: , linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim , ceph-devel@vger.kernel.org, "Yan, Zheng" , Ilya Dryomov , Jan Kara Subject: [PATCH 13/15] ceph: Use pagevec_lookup_range_nr_tag() Date: Thu, 14 Sep 2017 15:18:17 +0200 Message-Id: <20170914131819.26266-14-jack@suse.cz> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170914131819.26266-1-jack@suse.cz> References: <20170914131819.26266-1-jack@suse.cz> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use new function for looking up pages since nr_pages argument from pagevec_lookup_range_tag() is going away. Signed-off-by: Jan Kara Reviewed-by: "Yan, Zheng" --- fs/ceph/addr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index e57e9d37bf2d..87789c477381 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -869,11 +869,9 @@ static int ceph_writepages_start(struct address_space *mapping, max_pages = wsize >> PAGE_SHIFT; get_more_pages: - pvec_pages = min_t(unsigned, PAGEVEC_SIZE, - max_pages - locked_pages); - pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index, + pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index, end, PAGECACHE_TAG_DIRTY, - pvec_pages); + max_pages - locked_pages); dout("pagevec_lookup_range_tag got %d\n", pvec_pages); if (!pvec_pages && !locked_pages) break;