[PATCH 2/2] ceph: use alloc_page() in fill_fscrypt_truncate()
From: Tal Zussman
Date: Sun Sep 13 2026 - 20:04:32 EST
fill_fscrypt_truncate() allocates a scratch page with
__page_cache_alloc(). The page never enters the page cache and is freed
with __free_pages(). It does not need the cpuset memory spread policy
that __page_cache_alloc() applies, so use alloc_page() instead.
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
fs/ceph/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 149a82f0b3c8..63c3973fbb9d 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2547,7 +2547,7 @@ static int fill_fscrypt_truncate(struct inode *inode,
goto out;
}
- page = __page_cache_alloc(GFP_KERNEL);
+ page = alloc_page(GFP_KERNEL);
if (page == NULL) {
ret = -ENOMEM;
goto out;
--
2.39.5