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: 40214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp944976wrt; Fri, 6 Jan 2023 09:44:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXtak/ADLjHdM+ScwGFyzI4G0NMRrX51FNyWn2NRRyRR+k4wKNDPkmZq+D9oEXZC6Im2cB7h X-Received: by 2002:a05:6402:1caa:b0:475:9918:37c7 with SMTP id cz10-20020a0564021caa00b00475991837c7mr44805141edb.32.1673027086879; Fri, 06 Jan 2023 09:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673027086; cv=none; d=google.com; s=arc-20160816; b=aBpg4uo7/enOMXFRuuWSMUvYTaKzpm/HCbq3xV+G4PmgBNZATHF5HIyHMQOK/PKtPu 8e106yMGxeLQmrnTQO0oQZx3pmDYua4Mxp/jOSIiDaKj2Lx7zpsqWJ7XxhSCo3nFFrr6 1I0+mm5Sz/J/JWxjc3ptFzbVHeNrSRudtWt85Xso/j3CP5eH532O+36AlLpfAxF/CJ00 jLPZI3lzNa9N+myAX1L53OcXB/w7omqvPDXnqTNksnppgRk+x7+NAgXDJw7cR8iCpKhm 7jc7GAiffGOI7IJdqXvkU2BlHYn0tquWymtJ2qev/WrDgQZmldRfYty/7VgAwAfXSNsD ayiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vckh/baVijnw/DvNkiAv9tifnlBZNg8TETdc+1Cau7E=; b=UfPo00WB3sfd75GJI1+5hE3n2wvdQXr0/DLxMvbgIJiojqZDmz8y5bCwBwu2d2+pYI RaibUrMtc7Mc76Uck/Wr1LkYtwSq0F3jeWGRJehgxxu8SymFgudfOrQ6nYGUkF7Crsy9 a/xKAlqUhyfsXE3or1IdTlFEylATOSCsmuK/h1umUxlLg62ceB9pCWPpPEkiDiTuDaW1 CK+KxWb7Hetck7qc0AXGC0+HxEgfo8Df5HZ7l47/qFca6QZoEVtwgG7d6dOlF1+CwrJ9 uQz1weeB1kxXwsx0fljQm5AbdnxKEbqzN8+eTtap0InEE42gSfYRYXZnfMU48pFYPPxU fpkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6cyH5ZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y4-20020a056402440400b0048eabb86492si2740782eda.42.2023.01.06.09.44.23; Fri, 06 Jan 2023 09:44:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6cyH5ZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235870AbjAFRlG (ORCPT + 99 others); Fri, 6 Jan 2023 12:41:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235742AbjAFRkt (ORCPT ); Fri, 6 Jan 2023 12:40:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC4907DE2F; Fri, 6 Jan 2023 09:40:45 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id CA83F616F5; Fri, 6 Jan 2023 17:40:44 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754296050862366950?= X-GMAIL-MSGID: =?utf-8?q?1754296050862366950?= 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;