Skip to content

Commit 97cf5d5

Browse files
lostjefflehsiangkao
authored andcommitted
erofs: get rid of unneeded GFP_NOFS
Clean up some leftovers since there is no way for EROFS to be called again from a reclaim context. Signed-off-by: Jingbo Xu <[email protected]> Reviewed-by: Gao Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
1 parent 6613476 commit 97cf5d5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

fs/erofs/fscache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb
459459

460460
inode->i_size = OFFSET_MAX;
461461
inode->i_mapping->a_ops = &erofs_fscache_meta_aops;
462-
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
462+
mapping_set_gfp_mask(inode->i_mapping, GFP_KERNEL);
463463
inode->i_blkbits = EROFS_SB(sb)->blkszbits;
464464
inode->i_private = ctx;
465465

fs/erofs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void *erofs_read_inode(struct erofs_buf *buf,
6060
} else {
6161
const unsigned int gotten = sb->s_blocksize - *ofs;
6262

63-
copied = kmalloc(vi->inode_isize, GFP_NOFS);
63+
copied = kmalloc(vi->inode_isize, GFP_KERNEL);
6464
if (!copied) {
6565
err = -ENOMEM;
6666
goto err_out;

fs/erofs/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct erofs_workgroup *erofs_insert_workgroup(struct super_block *sb,
8181
repeat:
8282
xa_lock(&sbi->managed_pslots);
8383
pre = __xa_cmpxchg(&sbi->managed_pslots, grp->index,
84-
NULL, grp, GFP_NOFS);
84+
NULL, grp, GFP_KERNEL);
8585
if (pre) {
8686
if (xa_is_err(pre)) {
8787
pre = ERR_PTR(xa_err(pre));

fs/erofs/zdata.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int z_erofs_bvec_enqueue(struct z_erofs_bvec_iter *iter,
230230
struct page *nextpage = *candidate_bvpage;
231231

232232
if (!nextpage) {
233-
nextpage = erofs_allocpage(pagepool, GFP_NOFS);
233+
nextpage = erofs_allocpage(pagepool, GFP_KERNEL);
234234
if (!nextpage)
235235
return -ENOMEM;
236236
set_page_private(nextpage, Z_EROFS_SHORTLIVED_PAGE);
@@ -302,7 +302,7 @@ static struct z_erofs_pcluster *z_erofs_alloc_pcluster(unsigned int size)
302302
if (nrpages > pcs->maxpages)
303303
continue;
304304

305-
pcl = kmem_cache_zalloc(pcs->slab, GFP_NOFS);
305+
pcl = kmem_cache_zalloc(pcs->slab, GFP_KERNEL);
306306
if (!pcl)
307307
return ERR_PTR(-ENOMEM);
308308
pcl->pclustersize = size;
@@ -694,7 +694,7 @@ static void z_erofs_cache_invalidate_folio(struct folio *folio,
694694
DBG_BUGON(stop > folio_size(folio) || stop < length);
695695

696696
if (offset == 0 && stop == folio_size(folio))
697-
while (!z_erofs_cache_release_folio(folio, GFP_NOFS))
697+
while (!z_erofs_cache_release_folio(folio, 0))
698698
cond_resched();
699699
}
700700

@@ -713,7 +713,7 @@ int erofs_init_managed_cache(struct super_block *sb)
713713
set_nlink(inode, 1);
714714
inode->i_size = OFFSET_MAX;
715715
inode->i_mapping->a_ops = &z_erofs_cache_aops;
716-
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
716+
mapping_set_gfp_mask(inode->i_mapping, GFP_KERNEL);
717717
EROFS_SB(sb)->managed_cache = inode;
718718
return 0;
719719
}

0 commit comments

Comments
 (0)