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/ext2 | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/ext2')
| -rw-r--r-- | fs/ext2/balloc.c | 2 | ||||
| -rw-r--r-- | fs/ext2/super.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 2bac6dcb1792..007eee794bd1 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -419,7 +419,7 @@ void ext2_init_block_alloc_info(struct inode *inode) struct ext2_block_alloc_info *block_i; struct super_block *sb = inode->i_sb; - block_i = kmalloc_obj(*block_i, GFP_KERNEL); + block_i = kmalloc_obj(*block_i); if (block_i) { struct ext2_reserve_window_node *rsv = &block_i->rsv_window_node; diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 9bb4c63f5628..b20a6eb6822b 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -893,12 +893,12 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc) __le32 features; int err; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; sbi->s_blockgroup_lock = - kzalloc_obj(struct blockgroup_lock, GFP_KERNEL); + kzalloc_obj(struct blockgroup_lock); if (!sbi->s_blockgroup_lock) { kfree(sbi); return -ENOMEM; @@ -1669,7 +1669,7 @@ static int ext2_init_fs_context(struct fs_context *fc) { struct ext2_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; |
