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 /drivers/md/persistent-data | |
| 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 'drivers/md/persistent-data')
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index 43bd64b77a7d..a5003774f8bf 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c @@ -388,7 +388,7 @@ struct dm_block_manager *dm_block_manager_create(struct block_device *bdev, int r; struct dm_block_manager *bm; - bm = kmalloc_obj(*bm, GFP_KERNEL); + bm = kmalloc_obj(*bm); if (!bm) { r = -ENOMEM; goto bad; diff --git a/drivers/md/persistent-data/dm-space-map-disk.c b/drivers/md/persistent-data/dm-space-map-disk.c index 1d3cfc87701a..27c0be9c5a37 100644 --- a/drivers/md/persistent-data/dm-space-map-disk.c +++ b/drivers/md/persistent-data/dm-space-map-disk.c @@ -220,7 +220,7 @@ struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm, int r; struct sm_disk *smd; - smd = kmalloc_obj(*smd, GFP_KERNEL); + smd = kmalloc_obj(*smd); if (!smd) return ERR_PTR(-ENOMEM); @@ -254,7 +254,7 @@ struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm, int r; struct sm_disk *smd; - smd = kmalloc_obj(*smd, GFP_KERNEL); + smd = kmalloc_obj(*smd); if (!smd) return ERR_PTR(-ENOMEM); diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c index 3c82a715ceed..4bffddeed8ec 100644 --- a/drivers/md/persistent-data/dm-space-map-metadata.c +++ b/drivers/md/persistent-data/dm-space-map-metadata.c @@ -772,7 +772,7 @@ struct dm_space_map *dm_sm_metadata_init(void) { struct sm_metadata *smm; - smm = kvmalloc_obj(*smm, GFP_KERNEL); + smm = kvmalloc_obj(*smm); if (!smm) return ERR_PTR(-ENOMEM); diff --git a/drivers/md/persistent-data/dm-transaction-manager.c b/drivers/md/persistent-data/dm-transaction-manager.c index 1f50f50665ef..7401add01d12 100644 --- a/drivers/md/persistent-data/dm-transaction-manager.c +++ b/drivers/md/persistent-data/dm-transaction-manager.c @@ -185,7 +185,7 @@ static struct dm_transaction_manager *dm_tm_create(struct dm_block_manager *bm, unsigned int i; struct dm_transaction_manager *tm; - tm = kmalloc_obj(*tm, GFP_KERNEL); + tm = kmalloc_obj(*tm); if (!tm) return ERR_PTR(-ENOMEM); @@ -207,7 +207,7 @@ struct dm_transaction_manager *dm_tm_create_non_blocking_clone(struct dm_transac { struct dm_transaction_manager *tm; - tm = kmalloc_obj(*tm, GFP_KERNEL); + tm = kmalloc_obj(*tm); if (tm) { tm->is_clone = 1; tm->real = real; |
