diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-04-07 14:25:22 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2021-04-19 13:13:26 -0400 |
commit | 7a35693adcd38664b852ad10e3742782b3e87987 (patch) | |
tree | 686928db3fc873385abbb159e8ea67ca5141c250 /drivers/md/dm-snap-persistent.c | |
parent | 5208692e80a1f3c8ce2063a22b675dd5589d1d80 (diff) | |
download | lwn-7a35693adcd38664b852ad10e3742782b3e87987.tar.gz lwn-7a35693adcd38664b852ad10e3742782b3e87987.zip |
dm: replace dm_vcalloc()
Use kvcalloc or kvmalloc_array instead (depending whether zeroing is
useful).
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap-persistent.c')
-rw-r--r-- | drivers/md/dm-snap-persistent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 8e329c3f3a78..9ab4bf651ca9 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -596,7 +596,7 @@ static void persistent_dtr(struct dm_exception_store *store) free_area(ps); /* Allocated in persistent_read_metadata */ - vfree(ps->callbacks); + kvfree(ps->callbacks); kfree(ps); } @@ -621,8 +621,8 @@ static int persistent_read_metadata(struct dm_exception_store *store, */ ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) / sizeof(struct disk_exception); - ps->callbacks = dm_vcalloc(ps->exceptions_per_area, - sizeof(*ps->callbacks)); + ps->callbacks = kvcalloc(ps->exceptions_per_area, + sizeof(*ps->callbacks), GFP_KERNEL); if (!ps->callbacks) return -ENOMEM; |