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 9D8C7C4BA01 for ; Tue, 25 Feb 2020 22:06:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5A83D20732 for ; Tue, 25 Feb 2020 22:06:06 +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="A+ugosl7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A83D20732 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18A046B0088; Tue, 25 Feb 2020 17:06:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 13B4A6B0089; Tue, 25 Feb 2020 17:06:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 050F26B008A; Tue, 25 Feb 2020 17:06:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id DFFEE6B0088 for ; Tue, 25 Feb 2020 17:06:05 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7F47021EA for ; Tue, 25 Feb 2020 22:06:05 +0000 (UTC) X-FDA: 76530033090.05.pies06_35224349ced38 X-HE-Tag: pies06_35224349ced38 X-Filterd-Recvd-Size: 3530 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 25 Feb 2020 22:06:05 +0000 (UTC) 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=0gMh1yamRVaNETPSTUEglHum9p/xixoA+LVU7RwCI34=; b=A+ugosl7XCuWZ0DZM060VhasbF LlgbO5ELIQJ449viGm0I1EI7L0UglVYvyBriRpH8pBN+Rmj714EtqvFrMaosZr24PrysRfLaHRbus QPSl3wzAaCuxS8hDzpCGhTD8X6bOOyCQ1vFuSYSN48wlEYAR2dKQnRt3n1ww8iX1t3NhnDsNxW/D+ 8NQfScKs2JhrTJV3TmYoXBX9y+9NBU0TzMuU3vu3FcLiH3QoiWjmtt4tk2jxf2c4WgVjtlmOna6E+ uGFSvdXtlaqgrmld7J0hqWFeqCKw0sMvK4sLrLFjwM5dcgtCPADXi0SCBPNZo+JeJ6/L85qK3eqe+ YVIWitkw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6i4H-0007rL-OM; Tue, 25 Feb 2020 21:48:41 +0000 From: Matthew Wilcox To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , 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 Subject: [PATCH v8 23/25] f2fs: Pass the inode to f2fs_mpage_readpages Date: Tue, 25 Feb 2020 13:48:36 -0800 Message-Id: <20200225214838.30017-24-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200225214838.30017-1-willy@infradead.org> References: <20200225214838.30017-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 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) --- 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 237dff36fe73..c8b042979fc4 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2159,12 +2159,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 =3D NULL; sector_t last_block_in_bio =3D 0; - struct inode *inode =3D mapping->host; struct f2fs_map_blocks map; #ifdef CONFIG_F2FS_FS_COMPRESSION struct compress_ctx cc =3D { @@ -2276,7 +2275,7 @@ static int f2fs_read_data_page(struct file *file, s= truct page *page) if (f2fs_has_inline_data(inode)) ret =3D f2fs_read_inline_data(inode, page); if (ret =3D=3D -EAGAIN) - ret =3D f2fs_mpage_readpages(page_file_mapping(page), NULL, page); + ret =3D f2fs_mpage_readpages(inode, NULL, page); return ret; } =20 @@ -2293,7 +2292,7 @@ static void f2fs_readahead(struct readahead_control= *rac) if (f2fs_has_inline_data(inode)) return; =20 - f2fs_mpage_readpages(rac->mapping, rac, NULL); + f2fs_mpage_readpages(inode, rac, NULL); } =20 int f2fs_encrypt_one_page(struct f2fs_io_info *fio) --=20 2.25.0