From patchwork Fri Jan 6 17:40:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13091659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF95DC54E76 for ; Fri, 6 Jan 2023 17:40:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 743EC900004; Fri, 6 Jan 2023 12:40:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F474900003; Fri, 6 Jan 2023 12:40:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BC2F900004; Fri, 6 Jan 2023 12:40:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4D291900003 for ; Fri, 6 Jan 2023 12:40:52 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 28A48AB553 for ; Fri, 6 Jan 2023 17:40:52 +0000 (UTC) X-FDA: 80325089544.12.69C7091 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf22.hostedemail.com (Postfix) with ESMTP id 3CD39C0010 for ; Fri, 6 Jan 2023 17:40:49 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z6cyH5ZR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673026850; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vckh/baVijnw/DvNkiAv9tifnlBZNg8TETdc+1Cau7E=; b=2yyXRgA7w4DTIM8epvFVbhobiLWXi9wWXPt4tQzqJe/8GckgiMEFh5g7RV42A/M66TuS0m TYfZ9DU989Enm31vdg5QJ8S1XspVPmh7ULHEJlCcgqKTAOZTxbknQXFTO92nQMOAW0j9qF 6wG9ZX1Ec6FRiF43oTz9IeqklzVUkNo= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z6cyH5ZR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673026850; a=rsa-sha256; cv=none; b=5fcgfS0L1AQgVijF3N7YBnhNM4CgVXPqRPihHBAriTtbCQ6+NpIXrnhBLSbZYQDFpnXdd5 6luqOcFySyZnSRCqpmfC+HtM4twY5P2JBrbR6uHnu+fJAILYaE3Szfbez9xUuyymTPmehC krgoOcBK46FJhaQdSGPaxs9UGdQGiU8= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 011C7CE1DB2; Fri, 6 Jan 2023 17:40:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F76BC433F1; Fri, 6 Jan 2023 17:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673026844; bh=YZZNY9dRwSGWCR6rI1dKx/9bpURDl+Gj2lOCqnQv91U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z6cyH5ZRauWxvfPORXoj+wOKxhm88QKwFJtkWNBMkZG3gI46FE91EyPqpwZKjrILS RgdcJG33HPg9cJHPy5eKKnjHWSKUFivP4YcQ4jZh5OFHyNvVMBPDYXP+JeOBde+1m2 Fhm7tKt4vQzjz1SEA8qQC32e+xF1RT1RngZPn80xzlR9cVkGZfdBKGoetCf2G6DF2i LXTwHWSLFbVDXuWTGf9J0WhubYpgHsqgVMo/4LH4Y+sGSrMCLFnwVW+dP2y6pS+joo EUjIaeme/J9pRRgLp3DDGE/0ygpmlNaOd6dGmBO34HShJ9efDfVSf2OiapQSu3LKmX jKdEAcoM+lVqA== From: SeongJae Park To: Andrew Morton Cc: willy@infradead.org, Xiubo Li , Ilya Dryomov , Jeff Layton , ceph-devel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 3/3] fs/ceph/addr: use folio_headpage() instead of folio_page() Date: Fri, 6 Jan 2023 17:40:28 +0000 Message-Id: <20230106174028.151384-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230106174028.151384-1-sj@kernel.org> References: <20230106174028.151384-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 3CD39C0010 X-Stat-Signature: mjxpqkcnp4i48azsh6yxybrjesuz9smz X-HE-Tag: 1673026849-784633 X-HE-Meta: U2FsdGVkX1/RWF899+0dn/E1uBcp2pYuWj8z2WiMQz7stPSuKs6jYWxDw9+ptZg/wlMBbULjr0EOKFhAq70OBUDwnRZnb5v4QytxiJOuRMo1Ppc2z0w6gS7f3D9+2UO0BeR2rCXb04/fwkIs4Pniu2URql3LujVRe2HpUkJESie404fcfUWyhZZhA/WGVniA/72bVxHuCcKjBEoVvUGPmEDz/P8jlUNlsBjB8o/amc05XJtLyQ36P1iZoBdJjqHkWbc3ONWml0FLYQzHZ2FW1U1tq6+qzHi+TmGzgFd61B3xwb32gjG0iMushGfKCwKFPwhD6/2RfSniQELCzzRQFHkwOLF+49EbV5eLhd7iFxks8qMATsP3Bn8UIsz+CcW3U3pikyfEvGho3tg0E8LZt19jMFrUZ58oV9w48Mw8a4/VOSsosu5A2/Zyis/YMuZFXOXnj1Q4TtGzrKdL9BMR00urj2629zIhf2/tm41qBqxToHG48PaYijtHL22IR5zcDmR2vcKP3Nj7fNChHiJFEmaXVaeyo8dU/RlYSuzGoFC8h3Wp5Ie5WMarGMckTsVYYEfnzW1kPWQpexlKJ3+Wclv2UxyWHz1AKlkFPE4/Pa60Mgw3tgeHg4u0UZ33TekEeulZ5DOR5WFIgMEc+q1kqew0tXrdFL55j1lFXv8s1wqrTck53g0SoaGWjljGfk5nZrdFW/30ZFNjWX5Upe4wfYTpnpuBSI8yc2lYoDEDSrnbP6YVvLSRCtgdesCgUBR0JO/y6wZAyTjiTNuy7KVBzsag7we5VW6mKhrRHbHpt021XxbzUHGwi/KWC6xJtQVlT0zzTb89gXUJcacZYk7E0lvrMwTxdA18+Tq2lWLADQTuJrucBxJWGA+/PnxlrSTnVrvJY46I3n/vJubzXO8eHx3uzTkY1bCn40WR5lz6CegBER/fWgJC1rbS0sfKQf72jASPVvLEnVvZ4poJsHb QoA2cpF9 RCbrf2CGhNd9t4XY2ZjzAkevX+eGFAW45CJoEvYst0qjhMOXrRmo25Pm9uPMfQDwFxrKj0/64rpQ6AtbPQwv/6k+bO9JdTq63Ln/4Ckzu4rPg9Sx5S+OViKgHRA== 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: Using 'folio_page(folio, 0)' for getting the head page of a folios is not the standard idiom and inefficient. Replace the call in fs/ceph/ to 'folio_headpage()'. Signed-off-by: SeongJae Park --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 8c74871e37c9..b76e94152b21 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1290,7 +1290,7 @@ static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_snap_context *snapc; - snapc = ceph_find_incompatible(folio_page(*foliop, 0)); + snapc = ceph_find_incompatible(folio_headpage(*foliop)); if (snapc) { int r;