summaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /fs/crypto
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
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>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/inline_crypt.c4
-rw-r--r--fs/crypto/keyring.c4
-rw-r--r--fs/crypto/keysetup_v1.c2
-rw-r--r--fs/crypto/policy.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
index e286d9fd17f3..c0852b920dbc 100644
--- a/fs/crypto/inline_crypt.c
+++ b/fs/crypto/inline_crypt.c
@@ -32,7 +32,7 @@ static struct block_device **fscrypt_get_devices(struct super_block *sb,
if (devs)
return devs;
}
- devs = kmalloc_obj(*devs, GFP_KERNEL);
+ devs = kmalloc_obj(*devs);
if (!devs)
return ERR_PTR(-ENOMEM);
devs[0] = sb->s_bdev;
@@ -169,7 +169,7 @@ int fscrypt_prepare_inline_crypt_key(struct fscrypt_prepared_key *prep_key,
unsigned int i;
int err;
- blk_key = kmalloc_obj(*blk_key, GFP_KERNEL);
+ blk_key = kmalloc_obj(*blk_key);
if (!blk_key)
return -ENOMEM;
diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c
index 855314a28b18..9ec6e5ef0947 100644
--- a/fs/crypto/keyring.c
+++ b/fs/crypto/keyring.c
@@ -209,7 +209,7 @@ static int allocate_filesystem_keyring(struct super_block *sb)
if (sb->s_master_keys)
return 0;
- keyring = kzalloc_obj(*keyring, GFP_KERNEL);
+ keyring = kzalloc_obj(*keyring);
if (!keyring)
return -ENOMEM;
spin_lock_init(&keyring->lock);
@@ -434,7 +434,7 @@ static int add_new_master_key(struct super_block *sb,
struct fscrypt_master_key *mk;
int err;
- mk = kzalloc_obj(*mk, GFP_KERNEL);
+ mk = kzalloc_obj(*mk);
if (!mk)
return -ENOMEM;
diff --git a/fs/crypto/keysetup_v1.c b/fs/crypto/keysetup_v1.c
index 93fc2ab7ee97..3d673c36b678 100644
--- a/fs/crypto/keysetup_v1.c
+++ b/fs/crypto/keysetup_v1.c
@@ -221,7 +221,7 @@ fscrypt_get_direct_key(const struct fscrypt_inode_info *ci, const u8 *raw_key)
return dk;
/* Nope, allocate one. */
- dk = kzalloc_obj(*dk, GFP_KERNEL);
+ dk = kzalloc_obj(*dk);
if (!dk)
return ERR_PTR(-ENOMEM);
dk->dk_sb = ci->ci_inode->i_sb;
diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c
index 49309e9da4ea..9915e39362db 100644
--- a/fs/crypto/policy.c
+++ b/fs/crypto/policy.c
@@ -813,7 +813,7 @@ int fscrypt_parse_test_dummy_encryption(const struct fs_parameter *param,
if (param->type == fs_value_is_string && *param->string)
arg = param->string;
- policy = kzalloc_obj(*policy, GFP_KERNEL);
+ policy = kzalloc_obj(*policy);
if (!policy)
return -ENOMEM;