mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
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 <jefflexu@linux.alibaba.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20240124031945.130782-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
This commit is contained in:
parent
6613476e22
commit
97cf5d53b4
@ -459,7 +459,7 @@ static struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb
|
|||||||
|
|
||||||
inode->i_size = OFFSET_MAX;
|
inode->i_size = OFFSET_MAX;
|
||||||
inode->i_mapping->a_ops = &erofs_fscache_meta_aops;
|
inode->i_mapping->a_ops = &erofs_fscache_meta_aops;
|
||||||
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
|
mapping_set_gfp_mask(inode->i_mapping, GFP_KERNEL);
|
||||||
inode->i_blkbits = EROFS_SB(sb)->blkszbits;
|
inode->i_blkbits = EROFS_SB(sb)->blkszbits;
|
||||||
inode->i_private = ctx;
|
inode->i_private = ctx;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ static void *erofs_read_inode(struct erofs_buf *buf,
|
|||||||
} else {
|
} else {
|
||||||
const unsigned int gotten = sb->s_blocksize - *ofs;
|
const unsigned int gotten = sb->s_blocksize - *ofs;
|
||||||
|
|
||||||
copied = kmalloc(vi->inode_isize, GFP_NOFS);
|
copied = kmalloc(vi->inode_isize, GFP_KERNEL);
|
||||||
if (!copied) {
|
if (!copied) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
@ -81,7 +81,7 @@ struct erofs_workgroup *erofs_insert_workgroup(struct super_block *sb,
|
|||||||
repeat:
|
repeat:
|
||||||
xa_lock(&sbi->managed_pslots);
|
xa_lock(&sbi->managed_pslots);
|
||||||
pre = __xa_cmpxchg(&sbi->managed_pslots, grp->index,
|
pre = __xa_cmpxchg(&sbi->managed_pslots, grp->index,
|
||||||
NULL, grp, GFP_NOFS);
|
NULL, grp, GFP_KERNEL);
|
||||||
if (pre) {
|
if (pre) {
|
||||||
if (xa_is_err(pre)) {
|
if (xa_is_err(pre)) {
|
||||||
pre = ERR_PTR(xa_err(pre));
|
pre = ERR_PTR(xa_err(pre));
|
||||||
|
@ -230,7 +230,7 @@ static int z_erofs_bvec_enqueue(struct z_erofs_bvec_iter *iter,
|
|||||||
struct page *nextpage = *candidate_bvpage;
|
struct page *nextpage = *candidate_bvpage;
|
||||||
|
|
||||||
if (!nextpage) {
|
if (!nextpage) {
|
||||||
nextpage = erofs_allocpage(pagepool, GFP_NOFS);
|
nextpage = erofs_allocpage(pagepool, GFP_KERNEL);
|
||||||
if (!nextpage)
|
if (!nextpage)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
set_page_private(nextpage, Z_EROFS_SHORTLIVED_PAGE);
|
set_page_private(nextpage, Z_EROFS_SHORTLIVED_PAGE);
|
||||||
@ -302,7 +302,7 @@ static struct z_erofs_pcluster *z_erofs_alloc_pcluster(unsigned int size)
|
|||||||
if (nrpages > pcs->maxpages)
|
if (nrpages > pcs->maxpages)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pcl = kmem_cache_zalloc(pcs->slab, GFP_NOFS);
|
pcl = kmem_cache_zalloc(pcs->slab, GFP_KERNEL);
|
||||||
if (!pcl)
|
if (!pcl)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
pcl->pclustersize = size;
|
pcl->pclustersize = size;
|
||||||
@ -694,7 +694,7 @@ static void z_erofs_cache_invalidate_folio(struct folio *folio,
|
|||||||
DBG_BUGON(stop > folio_size(folio) || stop < length);
|
DBG_BUGON(stop > folio_size(folio) || stop < length);
|
||||||
|
|
||||||
if (offset == 0 && stop == folio_size(folio))
|
if (offset == 0 && stop == folio_size(folio))
|
||||||
while (!z_erofs_cache_release_folio(folio, GFP_NOFS))
|
while (!z_erofs_cache_release_folio(folio, 0))
|
||||||
cond_resched();
|
cond_resched();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,7 +713,7 @@ int erofs_init_managed_cache(struct super_block *sb)
|
|||||||
set_nlink(inode, 1);
|
set_nlink(inode, 1);
|
||||||
inode->i_size = OFFSET_MAX;
|
inode->i_size = OFFSET_MAX;
|
||||||
inode->i_mapping->a_ops = &z_erofs_cache_aops;
|
inode->i_mapping->a_ops = &z_erofs_cache_aops;
|
||||||
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
|
mapping_set_gfp_mask(inode->i_mapping, GFP_KERNEL);
|
||||||
EROFS_SB(sb)->managed_cache = inode;
|
EROFS_SB(sb)->managed_cache = inode;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user