From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B58AA400DFC for ; Mon, 31 Aug 2026 12:32:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788179567; cv=none; b=TDPKl+VB7Sz7uNVEHFVZ2DhCNAg17an91lxwgExn/E8EyV28Kbv1l3ufFXfJuLM/81acj6Dr6v+1FWz3zSkWXQv9ubcO1p68cnF/DvWcUSGibaDgghviIlnsBGr6Q58P2ps7rR70upuvWvbe7e9PPfzRhqF/7mISLBGFeHVwqvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788179567; c=relaxed/simple; bh=0iTP8H+ovE/Q0gNn8Cxe+FweOHnKpRIjv3V+bcPNU6U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EoBf3PcDpXO8bRJMFDDM+Svyf2nofJoV3wC425bRSH5OyxJ9N3iu5s3+ovPlehzTxZEe6tw98XETTA6q4uZDvC9cWSN1c4R/3D6GL5HkI27Rq8wzdSkL69btqggS2bRdAPoceRvPa4CoBriRc3TdhZpNbs0nneYhS4CDq80YBgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=Nb9/q9qh; arc=none smtp.client-ip=115.124.30.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="Nb9/q9qh" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1788179560; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=d7kMVnx2LblB7BHqjw+a56gGYnnF9uAQgrmNwvR5plE=; b=Nb9/q9qhl4SXbdamGvZNvj0mFm1vfuJL6OdDoNZzwsT+rIGCW2TkHectsNJ3K3+zbYyYEorsDZwS2GkCN/qq6AW7FrrJMBPj+Kmw4eIMNNyJigUQee5cOMjkMFDn8qOEqyqdK0CL/f0mXKp6rADgtffuR5t8xqoEhAv+gbxdz7o= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=libaokun@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0X9yvEG1_1788179558; Received: from 30.221.129.244(mailfrom:libaokun@linux.alibaba.com fp:SMTPD_---0X9yvEG1_1788179558 cluster:ay36) by smtp.aliyun-inc.com; Mon, 31 Aug 2026 20:32:39 +0800 Message-ID: <156326be-7d4a-4bdf-b0c0-030dc951af2e@linux.alibaba.com> Date: Mon, 31 Aug 2026 20:32:38 +0800 Precedence: bulk X-Mailing-List: ntfs@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/9] ext4: Remove uses of FGP_NOFS To: "Matthew Wilcox (Oracle)" Cc: Christian Brauner , Jan Kara , Gao Xiang , Chao Yu , Theodore Tso , Trond Myklebust , Anna Schumaker , Namjae Jeon , Hyunchul Lee , Phillip Lougher , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-nfs@vger.kernel.org, ntfs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20260830041901.2668-1-willy@infradead.org> <20260830041901.2668-3-willy@infradead.org> Content-Language: en-US From: Baokun Li In-Reply-To: <20260830041901.2668-3-willy@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2026/8/30 12:18, Matthew Wilcox (Oracle) wrote: > Both of these locations are called while a transaction is in progress. > Starting a transaction uses memalloc_nofs_save(), so we are already > prevented from recursing into the filesystem and using GFP_NOFS was > unnecessary. > > Signed-off-by: Matthew Wilcox (Oracle) Looks good to me. Reviewed-by: Baokun Li > --- > fs/ext4/inline.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c > index ceee69a66482..1884abb09614 100644 > --- a/fs/ext4/inline.c > +++ b/fs/ext4/inline.c > @@ -601,9 +601,7 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping, > goto out; > } > > - /* We cannot recurse into the filesystem as the transaction is already > - * started */ > - folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN | FGP_NOFS, > + folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN, > mapping_gfp_mask(mapping)); > if (IS_ERR(folio)) { > ret = PTR_ERR(folio); > @@ -734,7 +732,7 @@ int ext4_generic_write_inline_data(struct address_space *mapping, > goto out_release_bh; > } > > - folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN | FGP_NOFS, > + folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN, > mapping_gfp_mask(mapping)); > if (IS_ERR(folio)) { > ret = PTR_ERR(folio);