Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2964727imm; Sun, 7 Oct 2018 16:30:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV63p4DEj4H8ixLPhaQCztrudf6sWqzYu0E11qA/8bYLc2l4/Tt00FS0AQUDIbhMz5flxkkbe X-Received: by 2002:a17:902:8644:: with SMTP id y4-v6mr21699604plt.48.1538955005822; Sun, 07 Oct 2018 16:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538955005; cv=none; d=google.com; s=arc-20160816; b=qcaJMiFHzmL16ps87R4NcNjYQSTD6l1ttpCqFPbgz6VZ+5Ebc4M8qLWli4P5C2A6FF PrZB19dB511assSci4quRcgQAjBkSGLgy6I5ih2t0jlcahh1Q8Ar/sDwGSIIc2DhraPw t9X6ZiIQ6qUHJvJhD1m4/D2LdJWUsUERllE6qqshGraZWbjZetIR05dOllmd9SuaUsvB 3Ui9Yr0IaKxSMqLUyZs6FHvm1Pxbid8pNf498alWT9/jR8v6UWb04yUNO4dCNvt17i/x 3o+/D4NuRf5kRGxp8qU9G2EKBR4G3wgXw05/Z3LaISfPC3mz6kCI5//3VSUj2QIriTzE OZEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mDD2baT+lsROoq6EE1W/VAoJVJKr4qIgwTtt1LziTQk=; b=WH3gc93+wvtkWzCUfZfHmIbm21AoRxD7iA/LZ3Ot1c6jnTp3ImcO4z1XCw3RBKdfIB KTwLLGmGFUb01T4wCle54v/uHIvm8ZACxNRpZagkTcS7BLaPgqUugszf2ADyvjhp8BmG fMTnU33kc/t1qGh6FO0CvCFa7YUyzGMULtPdCvhFcwovxRMzA6nLkSlLt4mxjses8Msi m3T4gfQcgQQc5q2GiGRHA6YGk2rN8JCmDaVfcBgPT0tGEHTLpjfT1gBuAg6SWxTUMfjs 8JsVpF4ii+l4cxL0x0w37GyyEHrHZvjpFIft5wOIgfLrCgiuB4yUXDYBoljfGS1vTAlJ AXqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b="Z/UWtp8R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l129-v6si16483711pga.219.2018.10.07.16.29.50; Sun, 07 Oct 2018 16:30:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b="Z/UWtp8R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728108AbeJHGhA (ORCPT + 99 others); Mon, 8 Oct 2018 02:37:00 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:33207 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbeJHGg7 (ORCPT ); Mon, 8 Oct 2018 02:36:59 -0400 Received: by mail-qk1-f195.google.com with SMTP id 84-v6so11122432qkf.0 for ; Sun, 07 Oct 2018 16:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mDD2baT+lsROoq6EE1W/VAoJVJKr4qIgwTtt1LziTQk=; b=Z/UWtp8RrUBS2mVYRS/FVfMBammL2mQ7yItwRAovAQ8EH/hTGqNbRLlcIZne5m7NRP STMRofc1/7cn4mtU+2exQWD+LREr8gd9Y6cRUu4e28eepYY7hfuphF7fd8sdmWRPhIb0 pHVXCZAyJeaxpl0NbPX7xUVHzptY+C/3NQFVSZkOhu1OI2YG3rXXWo6G/HyJP4bE2JqT eFKiXO25YCRMHhyi3Z7HxYreCAD+c0vRqD1b996G0s0fs3PCFb6uJKpom1UoLP8P9GRB H8/N/7BnQOBJp4tQtvz4r8A8dCxsO1zr9xnUQk0WontuSWgsfuKjBTMLY0K1Sz64hlQS Gjig== 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:mime-version:content-transfer-encoding; bh=mDD2baT+lsROoq6EE1W/VAoJVJKr4qIgwTtt1LziTQk=; b=maIeeSEr4QTTW0n1eFuhMts0CVsAcPzkH8M+jrh6JtfbTJS4nAGDRTRCzMdhW+ueiQ UxCdu+6AxLM3bYC7Wyp8tfCeDa3Jgt/FXkuWDM1MhY9TqdT/BYqw0ZzFfxibZgBMuhjT dtQqtffa9KhKM1JFTGQiwyXcbaxz2vK3LEZ9jwZEM8jHUGlZCYz/yHHsW3ouvitVkXAM ocRkFrKFfiy5gAdVfs9phsEAyuTTgZXDPthe2keeHpJbv0ke5j9MX8myEQ8pTtH5qEVe ziew7aWaarvcySZt1nYP/MIJ0iw6YvX4LDJOi3MJ3Ph5LNyBvQaiZIsBRRKcJUK8Bb6P F5TQ== X-Gm-Message-State: ABuFfoiNnbIl65r54NvngkltEM5lUP9dXRiVCCRi8bI5f+SWaCC83DjA VanEPlnF6AwPH9JqQl4GIp0T2g== X-Received: by 2002:a37:38c:: with SMTP id 134-v6mr16296266qkd.194.1538954886346; Sun, 07 Oct 2018 16:28:06 -0700 (PDT) Received: from ip-172-31-22-34.ec2.internal (ec2-35-153-175-159.compute-1.amazonaws.com. [35.153.175.159]) by smtp.gmail.com with ESMTPSA id x38-v6sm6793915qtc.39.2018.10.07.16.28.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Oct 2018 16:28:05 -0700 (PDT) From: Martin Brandenburg To: devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hubcap@omnibond.com Cc: Martin Brandenburg Subject: [PATCH 09/19] orangefs: remove orangefs_readpages Date: Sun, 7 Oct 2018 23:27:26 +0000 Message-Id: <20181007232736.3780-10-martin@omnibond.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181007232736.3780-1-martin@omnibond.com> References: <20181007232736.3780-1-martin@omnibond.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's a copy of the loop which would run in read_pages from mm/readahead.c. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index cf0811ef0e93..1ef000b69e06 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -15,7 +15,7 @@ #include "orangefs-kernel.h" #include "orangefs-bufmap.h" -static int read_one_page(struct page *page) +static int orangefs_readpage(struct file *file, struct page *page) { int ret; int max_block; @@ -60,42 +60,6 @@ static int read_one_page(struct page *page) return ret; } -static int orangefs_readpage(struct file *file, struct page *page) -{ - return read_one_page(page); -} - -static int orangefs_readpages(struct file *file, - struct address_space *mapping, - struct list_head *pages, - unsigned nr_pages) -{ - int page_idx; - int ret; - - gossip_debug(GOSSIP_INODE_DEBUG, "orangefs_readpages called\n"); - - for (page_idx = 0; page_idx < nr_pages; page_idx++) { - struct page *page; - - page = list_entry(pages->prev, struct page, lru); - list_del(&page->lru); - if (!add_to_page_cache(page, - mapping, - page->index, - readahead_gfp_mask(mapping))) { - ret = read_one_page(page); - gossip_debug(GOSSIP_INODE_DEBUG, - "failure adding page to cache, read_one_page returned: %d\n", - ret); - } else { - put_page(page); - } - } - BUG_ON(!list_empty(pages)); - return 0; -} - static void orangefs_invalidatepage(struct page *page, unsigned int offset, unsigned int length) @@ -141,7 +105,6 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, /** ORANGEFS2 implementation of address space operations */ static const struct address_space_operations orangefs_address_operations = { .readpage = orangefs_readpage, - .readpages = orangefs_readpages, .invalidatepage = orangefs_invalidatepage, .releasepage = orangefs_releasepage, .direct_IO = orangefs_direct_IO, -- 2.19.0