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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 198C1C433EF for ; Fri, 18 Feb 2022 20:42:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233043AbiBRUmp (ORCPT ); Fri, 18 Feb 2022 15:42:45 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233019AbiBRUmp (ORCPT ); Fri, 18 Feb 2022 15:42:45 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25CD641300; Fri, 18 Feb 2022 12:42:28 -0800 (PST) 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=40QY1Rdp00LDixcusTe0wqIqkM2Ud3XthEeGP7JtuJA=; b=cBFK4XH1tw4+phmmvC7nGvrX4L 6osPzcETAuu34InapaZ7gOJ6H+6bCzaKz90YQXm0mLDTMoNIDvUkws9jJA4wD1oAPCGWAuLdCnMDG BTT9nRV54tjQEIu8eAnfiq8JUNrSw7741Zu4rC7PA1Tp79NRz387sYrTQYo8wunvgE7+8IMPyImRs a+YxknknT4s70r6EQz6GWBVVmFRE2Mzu59KuouGWpYnjfxoOEic91nf8Y8FzAIVj7AI6yvL3KT7kJ Km4ieSywJsgocAQVEuBfgcpUOj7RdYpTC7bIEmyOfpBiJoQ7FYXLL81lomlHlauaP11TT/W+KKwCi YRAjamQg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLA5A-00GvUM-Tm; Fri, 18 Feb 2022 20:42:25 +0000 Date: Fri, 18 Feb 2022 20:42:24 +0000 From: Matthew Wilcox To: Stefan Roesch Cc: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2 04/13] fs: split off __alloc_page_buffers function Message-ID: References: <20220218195739.585044-1-shr@fb.com> <20220218195739.585044-5-shr@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220218195739.585044-5-shr@fb.com> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Feb 18, 2022 at 11:57:30AM -0800, Stefan Roesch wrote: > This splits off the __alloc_page_buffers() function from the > alloc_page_buffers_function(). In addition it adds a gfp_t parameter, so > the caller can specify the allocation flags. This one only has six callers, so let's get the API right. I suggest making this: struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size, gfp_t gfp) { gfp |= __GFP_ACCOUNT; and then all the existing callers specify either GFP_NOFS or GFP_NOFS | __GFP_NOFAIL.