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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 2AC2FC43214 for ; Mon, 9 Aug 2021 06:31:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BF3B61002 for ; Mon, 9 Aug 2021 06:31:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233322AbhHIGcM (ORCPT ); Mon, 9 Aug 2021 02:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233310AbhHIGcK (ORCPT ); Mon, 9 Aug 2021 02:32:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82A8C061798 for ; Sun, 8 Aug 2021 23:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OYrmxkbgyCtkM5MBp6xZVs6ZxMYa8f0w2YvZIHffc6k=; b=RI8fbF2ySxTiNEVkvCuWq95mcF wVUGTUP7Te52y/0USuDmD51ryTx49KB8nCwFDgne1LaYSxpU+I7uw7vSNUViBS5CAdaP4Ur4kBVup omn3WfzNdp+oigU+GFu1A7CaRCPcePCRPZuIQ7ibws0Qe+4JyWyTY28goY95u3/zfV9qTDVpfyI+b wAVk0aQBCf9IaAw7t+c1AruEcle50va+8q0G338BmpdMm7NUFgZJqHjzTyS2GGzkvqHRHio7ibEps u1ZMlbFL6xFwRbGPNq5jeO0ZKefl3PUjrOvDEuVcx5P4Qybnhre+jSmgPHKWUVwzkMvOmMOoUl3I7 CI+bT/KA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mCynP-00AheP-VD; Mon, 09 Aug 2021 06:30:07 +0000 Date: Mon, 9 Aug 2021 07:29:59 +0100 From: Christoph Hellwig To: John Hubbard Cc: Andrew Morton , Matthew Wilcox , LKML , linux-mm@kvack.org Subject: Re: [PATCH 3/3] mm/gup: refactor and simplify try_get_page() Message-ID: References: <20210808235018.1924918-1-jhubbard@nvidia.com> <20210808235018.1924918-4-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210808235018.1924918-4-jhubbard@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 08, 2021 at 04:50:18PM -0700, John Hubbard wrote: > +/* > + * This has the same functionality as try_get_compound_head(), just with a > + * slightly different API. > + */ > static inline __must_check bool try_get_page(struct page *page) > { > + return try_get_compound_head(page, 1) != NULL; What about removing try_get_page entirely instead?