From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796370752; b=Bk1We0FXcCFzKEqlZ1nQbZ7Ush+WQQ+5iRmpkOjA5Nsvm7v0XtxjIzRGtpIRME4AM97X PiQeT373ccvMTtpsgabxmdvr8mal8bvCMXT+ohfqiAVNWhVk2vuMBs+HWDL2V0Zq7JTXP 0v4ktq8psRKmo7WeCY1FMfh8IeJxV96DKeoa+5lObCgYx90HgNksRYNV7+soFI3I8c4cL hgTaxXVxy+NuXOoNopJUD56uyRPbZoap+AjEuy6S7d5t1LiqC5LjpF5VDrgLfRIBtVqx+ bFVYxLCAeRZQ8dUuirAi7SPjrtN7LD6ByXVAbbZnaD/0In26Ln7aFx76j5SZC/7N0wg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796370752; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:Autocrypt:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=Ehy7mTLbG9WKuJA2ZlSGnhfyEjqBEJlo9TV6GoA6usw=; b=XPCb/ZBUqKxNTnA4oJDMkrmCDQLBsWExiD2gOF1cinka49JLyVv/NqASZ0T/KLcD1SmF aDdBO7Lppi4YS6ra6xVW6XT3KgISMUYT3OY7WJE+/Di8590IhKhbkkfmX18I2VnKwa81u QAPI1J+//Ckh9znsjnUaJIfnaEhJD3SlPN2tWtSysM5dEp7daCieL2JcFwPgudLV2vTlX EGM+WZzHjody8g+AnOENGc/CgxnCs40X2nPJl+M194O85+Y9zyYIZ7hz6Be8TBt2er0Xi d2y2QAcYvjauMsQlivGPCx3hVSoxsje3TEguoSyHKMYUmATo34lc/NdF4CzpgUAnqkA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=HaN4SErJ; arc=none smtp.remote-ip=209.85.208.45 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9E92606A322 for ; Fri, 4 Dec 2026 07:52:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B9E92606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=HaN4SErJ Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6ba12b00c76so626264a12.0 for ; Thu, 03 Dec 2026 23:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1796370750; x=1796975550; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ehy7mTLbG9WKuJA2ZlSGnhfyEjqBEJlo9TV6GoA6usw=; b=HaN4SErJZVHoTinlX8HhzVkGENYYxg7HmoB9igOlncOPhx+VKiXiZgOOMNP2rY38si hrPQO9rxJbmPQvBflrpd4/U8e/0BSeWAMgiqVMYvhPllsGX/UOenSyMaYJMAuUPrJUHY /v85PWjD07aANOKvOwPnS3W8Wl8ywajcNpSP0nEPDKs17yDxqndsivJ7WWeMv+Tceo16 PCmev8qrcfS4jouHGpVLFcziqBrZRTiqJMsKF3r6oPbApqCtrlpoJsb33xWa/Refx6LB oFrTXYeki01kcK7pIecwQElftriJx+LMpxjeqNm43KlKvb+KyySpGnBdcIXRFvbKmUju 1Qnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796370750; x=1796975550; h=content-transfer-encoding:content-type:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Ehy7mTLbG9WKuJA2ZlSGnhfyEjqBEJlo9TV6GoA6usw=; b=x8H5rVUkXia9n+QvRLkLLQWZmVe9FHfpledmmB9EMJUG2AgN/AVOu8LX+3pqKy+SPN OQNEKdwsCQz8sPf4qlu0vpQdEWFoTmnDzU30W3rP+DeAEfoeUlWVurOrUPTUo/Qs+iqn y2vFUxtTNhyQQ0BT8sXER+ySSrOQsmRgmU0+JLbJkJ+TIzxjc8wn34jQ88H+F0hUrzSY RDRY0z/qhJq2XgIiPiGNV5qRG4RH65QcLYce6wIDEt9kcyPBPqqyx9x6LCEbBEw7UMm8 i81LsYFJ3VQlXQzM1t2zPdd/romGqV1Uvqe56A5WJvdycgtWruQF2Jp0CWtyWthLGDcP 1QwQ== X-Forwarded-Encrypted: i=1; AL+hErF11pVYFXoZievUBnesAG+I5AVjn6Fgc8yGPvf1VPiiZW2Z/Rmpjm+PFmlLvwLA2wYE4u+budQCchOvUXg=@vger.kernel.org X-Gm-Message-State: APuU4Z9ibai9P+LypzRYHzg95fA8JlhU91cL0EOzpoFcVKf8D1jh0v2x Ov3fu/XVlDW5I4TvBEnOzppIZjIPO2auTcAUmK497G8DMb2KpSVtaFXCAs1TiSqf9FA= X-Gm-Gg: AZFdTZfj8N0VPHC/EiUlgF04wYJP42zQjeAS//h9Le3YjZoovqecwQBLVCtxzYR1T51 oD4dkVP96FmTlSdxhXS7V//3q3LXk3LRfsDp1zqdNGnRJmuSmhTCdtn9i0l++Npaa7Q3GPQvOjR ZZDuWh3OHwDNS8/rMJQFdxjjPrbZdDXwtuNddRUvUiDUO6kfXzMkbwkZESQmD00f6+lf2PR/4CF Xu9HFs6A+XSpMdFU919qAHBopmc+LZT5pzl63GLVrZ1W+197var1nZHzpt4PlHnqWoXR7U+GoQz J5pKCHFOvaFFC6nDCPw9dyjk7aeZKxuWpurcAie6vukZQdjyKM60RVKei9ZhMivAdiWi7UUM5eK B827+/B9WIb/Er/Yhc+jASjNEkK9jVgQnIO4M/uy1O/7AOLynd46kcXgZ0w2gwT+IxOZCBgjr4i V0KT5dXKlTUHAT8OObvCaFRo3Qh+8ErI7Lnf5l2y3GjlbmI2RD3+J1G1VNfxX4z0X6O2fiYgZe6 xAGlF2VL1O3/62qPiFAQWWtllxUpyN134bobCoq2T0UjAdfANcC3PcJD7BsVDaGQv0GQUdei6Pj qgrQAGagk5nRmimDRswN X-Received: by 2002:a05:6402:1f8f:b0:6b5:7fe8:5275 with SMTP id 4fb4d7f45d1cf-6bcc1d221d4mr763522a12.38.1796370750056; Thu, 03 Dec 2026 23:52:30 -0800 (PST) Received: from [172.16.0.229] ([159.196.52.54]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5ddc55a47sm2568154a91.13.2026.12.03.23.52.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 23:52:29 -0800 (PST) Message-ID: Date: Fri, 4 Dec 2026 18:22:20 +1030 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] btrfs: re-attach folio private when a released folio gets dirtied To: listout@listout.xyz, David Sterba , linux-btrfs@vger.kernel.org Cc: Qu Wenruo , Chris Mason , clm@fb.com, david@kernel.org, jgg@ziepe.ca, jhubbard@nvidia.com, peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, syzbot+d6f123d4060990f0f3ff@syzkaller.appspotmail.com, Brahmajit Das References: <20261203133059.2193197-1-listout@listout.xyz> <20261204063235.1033893-1-listout@listout.xyz> <20261204063235.1033893-3-listout@listout.xyz> Content-Language: en-US From: Qu Wenruo Autocrypt: addr=wqu@suse.com; keydata= xsBNBFnVga8BCACyhFP3ExcTIuB73jDIBA/vSoYcTyysFQzPvez64TUSCv1SgXEByR7fju3o 8RfaWuHCnkkea5luuTZMqfgTXrun2dqNVYDNOV6RIVrc4YuG20yhC1epnV55fJCThqij0MRL 1NxPKXIlEdHvN0Kov3CtWA+R1iNN0RCeVun7rmOrrjBK573aWC5sgP7YsBOLK79H3tmUtz6b 9Imuj0ZyEsa76Xg9PX9Hn2myKj1hfWGS+5og9Va4hrwQC8ipjXik6NKR5GDV+hOZkktU81G5 gkQtGB9jOAYRs86QG/b7PtIlbd3+pppT0gaS+wvwMs8cuNG+Pu6KO1oC4jgdseFLu7NpABEB AAHNGFF1IFdlbnJ1byA8d3F1QHN1c2UuY29tPsLAlAQTAQgAPgIbAwULCQgHAgYVCAkKCwIE FgIDAQIeAQIXgBYhBC3fcuWlpVuonapC4cI9kfOhJf6oBQJq3ujyBQkUpLw5AAoJEMI9kfOh Jf6o8OIH/0mqW+TQM4m2x3hCsnK+oB4yJH1qnGvIhFF/Lhs48wI02sGh6/4aA0hkCDfd9LHQ +ci4FUepZ9y4VS01+oIExbg/8ytzGYTzLtb44jK2GBOBVSJkMiha6jp22XFt7WUkT/tvbreu WWdGsaJIRQaZChy7xsMI8lqQ2WdmluZJ4LT0wD3l/l6QU1ZseMGySebdY9sVOQEOJNV7Qj92 /KOAFNmeZshV/qDI8Iw1RTs6TvLqCcqmlZLCmJkYSVhT1RonWRren8xIRcFEgMe004IDnt7V qdQhk/nhTS9x9MBAhMRl0TTE1VKDLvVALsud3iZLrmmtYvwPApzGJk052f0m28vOwE0EWdWB rwEIAKpT62HgSzL9zwGe+WIUCMB+nOEjXAfvoUPUwk+YCEDcOdfkkM5FyBoJs8TCEuPXGXBO Cl5P5B8OYYnkHkGWutAVlUTV8KESOIm/KJIA7jJA+Ss9VhMjtePfgWexw+P8itFRSRrrwyUf E+0WcAevblUi45LjWWZgpg3A80tHP0iToOZ5MbdYk7YFBE29cDSleskfV80ZKxFv6koQocq0 vXzTfHvXNDELAuH7Ms/WJcdUzmPyBf3Oq6mKBBH8J6XZc9LjjNZwNbyvsHSrV5bgmu/THX2n g/3be+iqf6OggCiy3I1NSMJ5KtR0q2H2Nx2Vqb1fYPOID8McMV9Ll6rh8S8AEQEAAcLAfAQY AQgAJgIbDBYhBC3fcuWlpVuonapC4cI9kfOhJf6oBQJq3ukKBQkUzDspAAoJEMI9kfOhJf6o SNsH/1ysUWOKmzY0rGS3ZdS61QgqMGhSWD/EJ4UiPw+xO4l4+GtX0fOAqxqsmBKqje3vyhBa Z5o/1Y+gNiN+E6RBcSz4b1TAd78sQ2bvT5DWOvBjeeVxHdiuQMIn4S8xk5ZpySBw5ifjoiuL 0M33UVtJOzM8yfAeL+d/Rp4leJw72SutjkLyZTG/gJIp4pJGD/kFHn24OLL0IxEcO0gOekNZ os5e1R6jAJ2ILk7+MDnvU8wXHcCiVzuDhJLI1tih1uUIE50muHQJWbYuVBbdJeu8WlIDDssx UOCxLylNG3gDXV5MhLubPTOpp9OiFc/XC37nvkgEcrlmlOFBv4/NJCbECpo= In-Reply-To: <20261204063235.1033893-3-listout@listout.xyz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 2026/12/4 17:02, listout@listout.xyz 写道: > From: Brahmajit Das > > syzbot reported an assertion failure in wait_subpage_spinlock(): > > assertion failed: folio_test_private(folio) && folio_get_private(folio), > in fs/btrfs/inode.c:7616 > kernel BUG at fs/btrfs/inode.c:7616! > Call Trace: > btrfs_invalidate_folio+0x26e/0xc50 > extent_writepage fs/btrfs/extent_io.c:2058 [inline] > extent_write_cache_pages fs/btrfs/extent_io.c:2843 [inline] > btrfs_writepages+0x129f/0x28c0 > do_writepages+0x338/0x560 > filemap_fdatawrite_range+0x1ef/0x2f0 > btrfs_start_ordered_extent_nowriteback+0x305/0x6e0 > btrfs_page_mkwrite+0x856/0x1a40 > ... > __gup_longterm_locked+0x1032/0x15c0 > ... > blkdev_direct_IO+0x121d/0x17b0 > aio_read+0x33a/0x4d0 > > The program does an O_DIRECT read into a MAP_SHARED mapping of a btrfs > file, while the same file is being truncated. > > A dirty folio of a btrfs data inode is expected to have folio::private, > but a folio can lose it while it stays in the page cache and is pinned > by an in-flight O_DIRECT read, e.g.: > > truncate_inode_partial_folio() > folio_invalidate(folio, offset, length) > btrfs_invalidate_folio() > btrfs_release_folio() /* folio is clean */ > __btrfs_release_folio() > clear_folio_extent_mapped() > folio_split_or_unmap() > folio_split() /* fails, the folio is pinned */ > > or from any failed large folio split, as __folio_freeze_split_file() > calls filemap_release_folio() before folio_ref_freeze(). > > When the read completes, the folio is re-dirtied without notifying the > fs: > > bio_release_pages() > folio_mark_dirty_lock() > btrfs_data_dirty_folio() > filemap_dirty_folio() > > If the folio is beyond EOF by then, btrfs_data_dirty_folio() does not > touch any btrfs state, and the next writeback calls folio_invalidate() > on a folio without private, triggering the above ASSERT() in the > bs < folio size case. If the folio straddles EOF, > btrfs_folio_set_fixup_dirty() dereferences the NULL folio private > instead. > > Fix it by re-attaching the folio private in btrfs_data_dirty_folio() > if it is missing, the same way iomap_dirty_folio() allocates its > per-folio state, with GFP_NOFS | __GFP_NOFAIL. This is safe because a > folio only loses its private while it is clean, and a clean folio has > no writable PTEs, so the atomic callers of ->dirty_folio() that hold > the PTE lock never see such a folio. The bio path above dirties folios > from process context, as bio_check_pages_dirty() defers to a workqueue. > > The folio was only released, not invalidated, so it can still be > uptodate. The new folio state starts with an empty uptodate bitmap, so > sync it with the folio flag there. > > Note: syzbot has no reproducer for this issue. The fix was only build > tested, the race has not been reproduced locally. > > This patch was written with the help of an AI coding assistant (Claude), > from the syzbot report, console log and review feedback. The last two paragraphs look unnecessary to me, and upstream no longer require LLM disclosure. LLM is almost unavoidable these days, but as long as the LLM and you can explain the bug and fix well, I think it's fine. I can remove the paragraphs at merge time, and since it looks good to me now: Reviewed-by: Qu Wenruo But I'll wait for more feedback, as I'm not an expert on MM, although I trust iomap as the example to follow, feedback from MM people are always appreciated. Thanks, Qu > > Reported-by: syzbot+d6f123d4060990f0f3ff@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=d6f123d4060990f0f3ff > Fixes: 0680cbbf39ca ("btrfs: trigger cow fixup via dirty_folio()") > Signed-off-by: Brahmajit Das > --- > > Notes: > v4: > - Allocate with GFP_NOFS | __GFP_NOFAIL like iomap_dirty_folio(), and > drop the GFP_NOWAIT failure handling and the extent_writepage() > fallback (Qu) > - Sync the uptodate bitmap in btrfs_data_dirty_folio() instead of in > btrfs_attach_folio_state(), dropping v3 patch 2 (Qu) > - v3: https://lore.kernel.org/linux-btrfs/20261203133059.2193197-1-listout@listout.xyz/ > > v3: > - Split into a series (Sashiko AI review) > - v2: https://lore.kernel.org/linux-btrfs/20261202041853.4184717-1-listout@listout.xyz/ > > v2: > - Re-attach the folio private in btrfs_data_dirty_folio() (Qu) > - v1: https://lore.kernel.org/linux-btrfs/20261130182637.468143-1-listout@listout.xyz/ > > fs/btrfs/extent_io.c | 13 ++++++++++--- > fs/btrfs/extent_io.h | 1 + > fs/btrfs/inode.c | 23 +++++++++++++++++++++++ > fs/btrfs/subpage.c | 5 +++-- > fs/btrfs/subpage.h | 3 ++- > 5 files changed, 39 insertions(+), 6 deletions(-) > > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index 9dded5c670de..9fc36215febf 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -923,11 +923,12 @@ static int attach_extent_buffer_folio(struct extent_buffer *eb, > folio_attach_private(folio, prealloc); > else > /* Do new allocation to attach subpage */ > - ret = btrfs_attach_folio_state(fs_info, folio, BTRFS_SUBPAGE_METADATA); > + ret = btrfs_attach_folio_state(fs_info, folio, BTRFS_SUBPAGE_METADATA, > + GFP_NOFS); > return ret; > } > > -int set_folio_extent_mapped(struct folio *folio) > +int set_folio_extent_mapped_gfp(struct folio *folio, gfp_t gfp) > { > struct btrfs_fs_info *fs_info; > > @@ -939,12 +940,18 @@ int set_folio_extent_mapped(struct folio *folio) > fs_info = folio_to_fs_info(folio); > > if (btrfs_is_subpage(fs_info, folio)) > - return btrfs_attach_folio_state(fs_info, folio, BTRFS_SUBPAGE_DATA); > + return btrfs_attach_folio_state(fs_info, folio, > + BTRFS_SUBPAGE_DATA, gfp); > > folio_attach_private(folio, (void *)EXTENT_FOLIO_PRIVATE); > return 0; > } > > +int set_folio_extent_mapped(struct folio *folio) > +{ > + return set_folio_extent_mapped_gfp(folio, GFP_NOFS); > +} > + > void clear_folio_extent_mapped(struct folio *folio) > { > struct btrfs_fs_info *fs_info; > diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h > index c55b37cb24b7..1da7606efaad 100644 > --- a/fs/btrfs/extent_io.h > +++ b/fs/btrfs/extent_io.h > @@ -285,6 +285,7 @@ int btrfs_writepages(struct address_space *mapping, struct writeback_control *wb > int btree_writepages(struct address_space *mapping, struct writeback_control *wbc); > void btrfs_btree_wait_writeback_range(struct btrfs_fs_info *fs_info, u64 start, u64 end); > void btrfs_readahead(struct readahead_control *rac); > +int set_folio_extent_mapped_gfp(struct folio *folio, gfp_t gfp); > int set_folio_extent_mapped(struct folio *folio); > void clear_folio_extent_mapped(struct folio *folio); > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index 95c9530554d0..5d598d143880 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -10739,6 +10739,29 @@ static bool btrfs_data_dirty_folio(struct address_space *mapping, > round_up(i_size_read(&inode->vfs_inode), > fs_info->sectorsize)); > > + /* > + * The folio may have lost its private while it stayed in the page > + * cache, e.g. btrfs_release_folio() from a partial invalidation or > + * from a failed large folio split, while it was pinned by GUP. When > + * the pin is released, the folio is dirtied through here, so > + * re-attach the private, as every dirty folio is expected to have it. > + * > + * Like iomap_dirty_folio(), use __GFP_NOFAIL. A folio can only lose > + * its private while it is clean, and a clean folio has no writable > + * PTEs, so we are never called here for such a folio from the atomic > + * callers that hold the PTE lock. > + * > + * The folio was only released, not invalidated, so it can still be > + * uptodate. The new folio state starts with an empty uptodate > + * bitmap, so sync it with the folio flag. > + */ > + if (unlikely(!folio_test_private(folio))) { > + set_folio_extent_mapped_gfp(folio, GFP_NOFS | __GFP_NOFAIL); > + if (folio_test_uptodate(folio)) > + btrfs_folio_set_uptodate(fs_info, folio, page_start, > + folio_size(folio)); > + } > + > if (range_end > page_start) > btrfs_folio_set_fixup_dirty(fs_info, folio, page_start, > range_end - page_start); > diff --git a/fs/btrfs/subpage.c b/fs/btrfs/subpage.c > index ebf18efe1ea3..c779bf4771b9 100644 > --- a/fs/btrfs/subpage.c > +++ b/fs/btrfs/subpage.c > @@ -36,7 +36,8 @@ > */ > > int btrfs_attach_folio_state(const struct btrfs_fs_info *fs_info, > - struct folio *folio, enum btrfs_folio_type type) > + struct folio *folio, enum btrfs_folio_type type, > + gfp_t gfp) > { > struct btrfs_folio_state *bfs; > > @@ -59,7 +60,7 @@ int btrfs_attach_folio_state(const struct btrfs_fs_info *fs_info, > if (type == BTRFS_SUBPAGE_DATA && !btrfs_is_subpage(fs_info, folio)) > return 0; > > - bfs = btrfs_alloc_folio_state(fs_info, folio_size(folio), type, GFP_NOFS); > + bfs = btrfs_alloc_folio_state(fs_info, folio_size(folio), type, gfp); > if (IS_ERR(bfs)) > return PTR_ERR(bfs); > > diff --git a/fs/btrfs/subpage.h b/fs/btrfs/subpage.h > index 9b106a73d682..83e758af4e4e 100644 > --- a/fs/btrfs/subpage.h > +++ b/fs/btrfs/subpage.h > @@ -104,7 +104,8 @@ static inline bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, > } > > int btrfs_attach_folio_state(const struct btrfs_fs_info *fs_info, > - struct folio *folio, enum btrfs_folio_type type); > + struct folio *folio, enum btrfs_folio_type type, > + gfp_t gfp); > void btrfs_detach_folio_state(const struct btrfs_fs_info *fs_info, struct folio *folio, > enum btrfs_folio_type type); >