]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: clean up remaining GFP_NOFS users
authorDave Chinner <dchinner@redhat.com>
Mon, 22 Apr 2024 17:00:51 +0000 (10:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:35 +0000 (11:37 -0700)
Source kernel commit: 204fae32d5f7b9ac673d3d4f636dcef8697db2f0

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: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_btree_staging.c

index 0828cc7e38a731c39d5e2124510abb59e9e1a6e7..45ef6aba851402fd6c5951029a54e4ebbbed8641 100644 (file)
@@ -139,7 +139,7 @@ xfs_btree_stage_afakeroot(
        ASSERT(!(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE));
        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));
        nops->alloc_block = xfs_btree_fakeroot_alloc_block;
        nops->free_block = xfs_btree_fakeroot_free_block;
@@ -220,7 +220,7 @@ xfs_btree_stage_ifakeroot(
        ASSERT(cur->bc_flags & XFS_BTREE_ROOT_IN_INODE);
        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));
        nops->alloc_block = xfs_btree_fakeroot_alloc_block;
        nops->free_block = xfs_btree_fakeroot_free_block;