Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2438734pxt; Mon, 9 Aug 2021 00:01:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoDDaUDuI0Mkn+jHgrHDoKbuV3OaCYZ7bzCeFdHQeo3r79dH46Ia8J/DqbnsN2kEuDjaPN X-Received: by 2002:a17:906:9742:: with SMTP id o2mr21539147ejy.532.1628492502834; Mon, 09 Aug 2021 00:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628492502; cv=none; d=google.com; s=arc-20160816; b=op9bq7PYXY3YWSYqj5hn28oGkAFbLgp27RsX6G43tyOC6LReMTnabtL5hIXVP1gmIE Yf7hg2M/O5tjUWi+ZiF306vWQPWEwd3CW8mpZIl4RNulAZbpEz9W5FGFwYpFcDdwxn9Q GIXANqjzxQim3V+YR0zcbgS40dlADcOMr+dchRGsWJ+PRKUGN2xnprnPx8KHFL1fi6Rn WlooBzi7sDMRx5qF/8la5YBd/W/6lemzDFMlOpo7QWDsJxKsuciOyml4PdfCXe6QE4WG 5Eq23x8jwVxGXXlwFp3Rl+tIuofN35QqbKtHLl2qoptkx+OD6enp5voPyAAoiSwGR3Ms N0wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OYrmxkbgyCtkM5MBp6xZVs6ZxMYa8f0w2YvZIHffc6k=; b=glu7nbLUCkPotjRRuiSP7HheKxVzbNQccLz0NhDcLeJEOVfi0QP3f2jo+1ShkIjodW /CzJh5mtegEXiOpJW3Wrc/1jMH9gssvUa91NLlxTin+vLiIF6LzRmIYh6knWL2jjSqpL HdkeMtEnJGhTRh7RqVPQzXv3xQbht9BagFf5q0DgPf2NvyA2DRNKpxQZqGS+JcQ0JI2U gwjBgG5iMtIUpPgDbmo3s3W+UVPsod6cLht0fk7oiy3wmb09mzzluGXFt9z3CTlUomsB tGqEbMpu/hHMze4j2o0mg/8mQIEtYEIpOPzIlZEzls1bXVVIK6t3eXvdzVclS04kWWRi Ziew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RI8fbF2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w24si17029610edr.159.2021.08.09.00.01.18; Mon, 09 Aug 2021 00:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RI8fbF2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233136AbhHIGcL (ORCPT + 99 others); Mon, 9 Aug 2021 02:32:11 -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?