summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2024-01-16 09:59:46 +1100
committerChandan Babu R <chandanbabu@kernel.org>2024-02-13 18:07:35 +0530
commit0b3a76e955ebe3d71a2bcd5990404ed522b40e17 (patch)
tree1a11b00f5d2df41428ed6bb14f844356f41fb90b /fs/xfs/libxfs/xfs_dir2.c
parent94a69db2367efcd7e0eeb5d4603340aff1d3c340 (diff)
xfs: use GFP_KERNEL in pure transaction contexts
When running in a transaction context, memory allocations are scoped to GFP_NOFS. Hence we don't need to use GFP_NOFS contexts in pure transaction context allocations - GFP_KERNEL will automatically get converted to GFP_NOFS as appropriate. Go through the code and convert all the obvious GFP_NOFS allocations in transaction context to use GFP_KERNEL. This further reduces the explicit use of GFP_NOFS in XFS. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index 728f72f0d078..8c9403b33191 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -236,7 +236,7 @@ xfs_dir_init(
if (error)
return error;
- args = kzalloc(sizeof(*args), GFP_NOFS | __GFP_NOFAIL);
+ args = kzalloc(sizeof(*args), GFP_KERNEL | __GFP_NOFAIL);
if (!args)
return -ENOMEM;
@@ -273,7 +273,7 @@ xfs_dir_createname(
XFS_STATS_INC(dp->i_mount, xs_dir_create);
}
- args = kzalloc(sizeof(*args), GFP_NOFS | __GFP_NOFAIL);
+ args = kzalloc(sizeof(*args), GFP_KERNEL | __GFP_NOFAIL);
if (!args)
return -ENOMEM;
@@ -435,7 +435,7 @@ xfs_dir_removename(
ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
XFS_STATS_INC(dp->i_mount, xs_dir_remove);
- args = kzalloc(sizeof(*args), GFP_NOFS | __GFP_NOFAIL);
+ args = kzalloc(sizeof(*args), GFP_KERNEL | __GFP_NOFAIL);
if (!args)
return -ENOMEM;
@@ -496,7 +496,7 @@ xfs_dir_replace(
if (rval)
return rval;
- args = kzalloc(sizeof(*args), GFP_NOFS | __GFP_NOFAIL);
+ args = kzalloc(sizeof(*args), GFP_KERNEL | __GFP_NOFAIL);
if (!args)
return -ENOMEM;