diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /fs/hfsplus | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip | |
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/hfsplus')
| -rw-r--r-- | fs/hfsplus/btree.c | 2 | ||||
| -rw-r--r-- | fs/hfsplus/dir.c | 2 | ||||
| -rw-r--r-- | fs/hfsplus/super.c | 2 | ||||
| -rw-r--r-- | fs/hfsplus/unicode_test.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 5016d97290c8..1220a2f22737 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -139,7 +139,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) struct page *page; unsigned int size; - tree = kzalloc_obj(*tree, GFP_KERNEL); + tree = kzalloc_obj(*tree); if (!tree) return NULL; diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index 9998b28aa8f7..d559bf8625f8 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c @@ -263,7 +263,7 @@ next: } rd = file->private_data; if (!rd) { - rd = kmalloc_obj(struct hfsplus_readdir_data, GFP_KERNEL); + rd = kmalloc_obj(struct hfsplus_readdir_data); if (!rd) { err = -ENOMEM; goto out; diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index f60f37caea65..7229a8ae89f9 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -698,7 +698,7 @@ static int hfsplus_init_fs_context(struct fs_context *fc) { struct hfsplus_sb_info *sbi; - sbi = kzalloc_obj(struct hfsplus_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct hfsplus_sb_info); if (!sbi) return -ENOMEM; diff --git a/fs/hfsplus/unicode_test.c b/fs/hfsplus/unicode_test.c index c162c0fea4a8..26145bf88946 100644 --- a/fs/hfsplus/unicode_test.c +++ b/fs/hfsplus/unicode_test.c @@ -22,7 +22,7 @@ static struct test_mock_string_env *setup_mock_str_env(u32 buf_size) { struct test_mock_string_env *env; - env = kzalloc_obj(struct test_mock_string_env, GFP_KERNEL); + env = kzalloc_obj(struct test_mock_string_env); if (!env) return NULL; @@ -393,7 +393,7 @@ static struct test_mock_sb *setup_mock_sb(void) { struct test_mock_sb *ptr; - ptr = kzalloc_obj(struct test_mock_sb, GFP_KERNEL); + ptr = kzalloc_obj(struct test_mock_sb); if (!ptr) return NULL; |
