From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E10EC54FCB for ; Tue, 14 Apr 2020 15:02:59 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F217B214D8; Tue, 14 Apr 2020 15:02:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="Wa1JFpwT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="gMMMzmva"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tls3uVI8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F217B214D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jON5W-0003gV-Kn; Tue, 14 Apr 2020 15:02:58 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jON5R-0003fA-2V for linux-f2fs-devel@lists.sourceforge.net; Tue, 14 Apr 2020 15:02:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=d2DvrmSJqp0uKsr0TxRufY8xZPJveItO/T9BCxXFlS8=; b=Wa1JFpwT59ovJC7S93O7csivQ7 AZDmn9VFRC9RtsmH2pFo9bXS2aohcK+8JO0xwLgCbyjGDm/EpSpjz4M4tPzrBhsJzoIAFTy4eHobt JTtFIzcdp6L8CHGgvQS0Zxbl7lP+xlx43HSLrikz9WlriDhWyu/GY6kJvHILt9XczL/k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=d2DvrmSJqp0uKsr0TxRufY8xZPJveItO/T9BCxXFlS8=; b=gMMMzmva6PYU0dX2zYVr9kP5+e K3UGmQNnfdD/XytlvxTROmrMq0hAzyyA0x/40upip5R2+vhDS3BWmyZipeF6fGv4sJJZnLavxvdlr h8LzsYF6Nz+0qS6jM/YysNSTJ8Vqfx//Dwp0ipM1NIqEuvNdOtstoJmH/miBu7xI3e5U=; Received: from bombadil.infradead.org ([198.137.202.133]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jON5P-00Fv7j-Sv for linux-f2fs-devel@lists.sourceforge.net; Tue, 14 Apr 2020 15:02:52 +0000 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 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 X-Headers-End: 1jON5P-00Fv7j-Sv Subject: [f2fs-dev] [PATCH v11 23/25] f2fs: Pass the inode to f2fs_mpage_readpages X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xfs@vger.kernel.org, William Kucharski , Eric Biggers , linux-kernel@vger.kernel.org, "Matthew Wilcox \(Oracle\)" , linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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) -- 2.25.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel