]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Feb 2026 22:41:11 +0000 (14:41 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 8 Apr 2026 19:39:56 +0000 (21:39 +0200)
Source kernel commit: bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43

This was done entirely with mindless brute force, using

git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
libxfs/xfs_ag.c
libxfs/xfs_rtgroup.c

index 0f1eaf5d6e39b89e769087521c2e244c9fff1b94..5742d59a2659da75a7b7cca0a7f4e6124e55c6de 100644 (file)
@@ -222,7 +222,7 @@ xfs_perag_alloc(
        struct xfs_perag        *pag;
        int                     error;
 
-       pag = kzalloc_obj(*pag, GFP_KERNEL);
+       pag = kzalloc_obj(*pag);
        if (!pag)
                return -ENOMEM;
 
index 69e71494057a1e6488ede6cbea88328cc00ea905..d127ac0d6110261b4cfa16f871aa25ba61409f43 100644 (file)
@@ -95,7 +95,7 @@ xfs_rtgroup_alloc(
        struct xfs_rtgroup      *rtg;
        int                     error;
 
-       rtg = kzalloc_obj(struct xfs_rtgroup, GFP_KERNEL);
+       rtg = kzalloc_obj(struct xfs_rtgroup);
        if (!rtg)
                return -ENOMEM;