aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2023-07-26 23:17:53 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2023-09-05 15:58:15 +0200
commit111c7d27a1b7954954afde46f9db01d5ad24b316 (patch)
treef8f141e44281d9162cf97f990d183907cc35e558 /fs/gfs2/quota.c
parent5f02d16868b9d738d70656d074518cac760d39ab (diff)
downloadlinux-111c7d27a1b7954954afde46f9db01d5ad24b316.tar.gz
gfs2: Use mapping->gfp_mask for metadata inodes
Set mapping->gfp mask to GFP_NOFS for all metadata inodes so that allocating pages in the address space of those inodes won't call back into the filesystem. This allows to switch back from find_or_create_page() to grab_cache_page() in two places. Partially reverts commit 220cca2a4f58 ("GFS2: Change truncate page allocation to be GFP_NOFS"). Thanks to Dan Carpenter <dan.carpenter@linaro.org> for pointing out a Smatch static checker warning. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 704192b7360506..96d41ee034d7a3 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -724,7 +724,7 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
blk = index << (PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift);
boff = off % bsize;
- page = find_or_create_page(mapping, index, GFP_NOFS);
+ page = grab_cache_page(mapping, index);
if (!page)
return -ENOMEM;
if (!page_has_buffers(page))