From patchwork Tue Apr 14 15:02:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 11488277 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2FED192C for ; Tue, 14 Apr 2020 15:20:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17206206D5 for ; Tue, 14 Apr 2020 15:20:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tls3uVI8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407392AbgDNPUP (ORCPT ); Tue, 14 Apr 2020 11:20:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405603AbgDNPCn (ORCPT ); Tue, 14 Apr 2020 11:02:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D385BC0610D6; Tue, 14 Apr 2020 08:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=d2DvrmSJqp0uKsr0TxRufY8xZPJveItO/T9BCxXFlS8=; b=tls3uVI8IspMisj9EUAIb1g489 IMlQIrIY+yuIFrFbEZAmahxkdU/+2btxHwhbbmnXO2fdvSgSh5APNIA7PBPw+ew1/96Xx+zYBDagK eu01FN1NCNaxls/3nJAU2P2OdEro6enSmEbc2k4yQs0gk1g1CDMMEjUlhgFRhAPBKGosrnwkgGGyj 0ia7tHYNkK+HIbEHfo+9KIVhwhuHs5Vy4kJ3Iopl5rrgIYMSKjavpSG+Qmi9Fqo+bIhIgqsVCbLPN Q7UA29s6ASP1fxGMFV7ToAuoQRucVR84TNS5M6ay1+vBsBMbDPQYo0KC/t9RGnt4ZKgP4oga5NAmi f9Nr02vQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jON5A-0006Pb-I8; Tue, 14 Apr 2020 15:02:36 +0000 From: Matthew Wilcox To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-xfs@vger.kernel.org, William Kucharski , Eric Biggers , Chao Yu , Jaegeuk Kim Subject: [PATCH v11 23/25] f2fs: Pass the inode to f2fs_mpage_readpages Date: Tue, 14 Apr 2020 08:02:31 -0700 Message-Id: <20200414150233.24495-24-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200414150233.24495-1-willy@infradead.org> References: <20200414150233.24495-1-willy@infradead.org> MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: "Matthew Wilcox (Oracle)" This function now only uses the mapping argument to look up the inode, and both callers already have the inode, so just pass the inode instead of the mapping. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Acked-by: Jaegeuk Kim --- fs/f2fs/data.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 5b72945bf9f1..03ec97f28235 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2177,12 +2177,11 @@ int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret, * use ->readpage() or do the necessary surgery to decouple ->readpages() * from read-ahead. */ -static int f2fs_mpage_readpages(struct address_space *mapping, +static int f2fs_mpage_readpages(struct inode *inode, struct readahead_control *rac, struct page *page) { struct bio *bio = NULL; sector_t last_block_in_bio = 0; - struct inode *inode = mapping->host; struct f2fs_map_blocks map; #ifdef CONFIG_F2FS_FS_COMPRESSION struct compress_ctx cc = { @@ -2294,7 +2293,7 @@ static int f2fs_read_data_page(struct file *file, struct page *page) if (f2fs_has_inline_data(inode)) ret = f2fs_read_inline_data(inode, page); if (ret == -EAGAIN) - ret = f2fs_mpage_readpages(page_file_mapping(page), NULL, page); + ret = f2fs_mpage_readpages(inode, NULL, page); return ret; } @@ -2311,7 +2310,7 @@ static void f2fs_readahead(struct readahead_control *rac) if (f2fs_has_inline_data(inode)) return; - f2fs_mpage_readpages(rac->mapping, rac, NULL); + f2fs_mpage_readpages(inode, rac, NULL); } int f2fs_encrypt_one_page(struct f2fs_io_info *fio)