Commit 204fae32 authored by Dave Chinner's avatar Dave Chinner Committed by Chandan Babu R

xfs: clean up remaining GFP_NOFS users

These few remaining GFP_NOFS callers do not need to use GFP_NOFS at
all. They are only called from a non-transactional context or cannot
be accessed from memory reclaim due to other constraints. Hence they
can just use GFP_KERNEL.
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent c704ecb2
...@@ -139,7 +139,7 @@ xfs_btree_stage_afakeroot( ...@@ -139,7 +139,7 @@ xfs_btree_stage_afakeroot(
ASSERT(!(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE)); ASSERT(!(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE));
ASSERT(cur->bc_tp == NULL); ASSERT(cur->bc_tp == NULL);
nops = kmalloc(sizeof(struct xfs_btree_ops), GFP_NOFS | __GFP_NOFAIL); nops = kmalloc(sizeof(struct xfs_btree_ops), GFP_KERNEL | __GFP_NOFAIL);
memcpy(nops, cur->bc_ops, sizeof(struct xfs_btree_ops)); memcpy(nops, cur->bc_ops, sizeof(struct xfs_btree_ops));
nops->alloc_block = xfs_btree_fakeroot_alloc_block; nops->alloc_block = xfs_btree_fakeroot_alloc_block;
nops->free_block = xfs_btree_fakeroot_free_block; nops->free_block = xfs_btree_fakeroot_free_block;
...@@ -220,7 +220,7 @@ xfs_btree_stage_ifakeroot( ...@@ -220,7 +220,7 @@ xfs_btree_stage_ifakeroot(
ASSERT(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE); ASSERT(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE);
ASSERT(cur->bc_tp == NULL); ASSERT(cur->bc_tp == NULL);
nops = kmalloc(sizeof(struct xfs_btree_ops), GFP_NOFS | __GFP_NOFAIL); nops = kmalloc(sizeof(struct xfs_btree_ops), GFP_KERNEL | __GFP_NOFAIL);
memcpy(nops, cur->bc_ops, sizeof(struct xfs_btree_ops)); memcpy(nops, cur->bc_ops, sizeof(struct xfs_btree_ops));
nops->alloc_block = xfs_btree_fakeroot_alloc_block; nops->alloc_block = xfs_btree_fakeroot_alloc_block;
nops->free_block = xfs_btree_fakeroot_free_block; nops->free_block = xfs_btree_fakeroot_free_block;
......
...@@ -109,7 +109,7 @@ xfs_attr_shortform_list( ...@@ -109,7 +109,7 @@ xfs_attr_shortform_list(
* It didn't all fit, so we have to sort everything on hashval. * It didn't all fit, so we have to sort everything on hashval.
*/ */
sbsize = sf->count * sizeof(*sbuf); sbsize = sf->count * sizeof(*sbuf);
sbp = sbuf = kmalloc(sbsize, GFP_NOFS | __GFP_NOFAIL); sbp = sbuf = kmalloc(sbsize, GFP_KERNEL | __GFP_NOFAIL);
/* /*
* Scan the attribute list for the rest of the entries, storing * Scan the attribute list for the rest of the entries, storing
......
...@@ -2008,7 +2008,7 @@ xfs_alloc_buftarg( ...@@ -2008,7 +2008,7 @@ xfs_alloc_buftarg(
#if defined(CONFIG_FS_DAX) && defined(CONFIG_MEMORY_FAILURE) #if defined(CONFIG_FS_DAX) && defined(CONFIG_MEMORY_FAILURE)
ops = &xfs_dax_holder_operations; ops = &xfs_dax_holder_operations;
#endif #endif
btp = kzalloc(sizeof(*btp), GFP_NOFS | __GFP_NOFAIL); btp = kzalloc(sizeof(*btp), GFP_KERNEL | __GFP_NOFAIL);
btp->bt_mount = mp; btp->bt_mount = mp;
btp->bt_bdev_handle = bdev_handle; btp->bt_bdev_handle = bdev_handle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment