summaryrefslogtreecommitdiff
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorUladzislau Rezki (Sony) <urezki@gmail.com>2023-03-31 09:37:27 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-04-18 16:29:48 -0700
commitfa1c77c13ca59101c4fbf0ff8bbadd3aaba375f8 (patch)
tree389e8308cd842908a291ee39b89afe7297877f88 /mm/vmalloc.c
parent27d9a0fdb53f05c93ed9c674b870c8add451697e (diff)
mm: vmalloc: rename addr_to_vb_xarray() function
Short the name of the addr_to_vb_xarray() function to the addr_to_vb_xa(). This aligns with other internal function abbreviations. Link: https://lkml.kernel.org/r/20230331073727.6968-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Suggested-by: Baoquan He <bhe@redhat.com> Reviewed-by: Baoquan He <bhe@redhat.com> Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Dave Chinner <david@fromorbit.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sony.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index add33286a43b..9683573f1225 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1949,7 +1949,7 @@ static DEFINE_PER_CPU(struct vmap_block_queue, vmap_block_queue);
* used as a hash table. When used as a hash a 'cpu' passed to
* per_cpu() is not actually a CPU but rather a hash index.
*
- * A hash function is addr_to_vb_xarray() which hashes any address
+ * A hash function is addr_to_vb_xa() which hashes any address
* to a specific index(in a hash) it belongs to. This then uses a
* per_cpu() macro to access an array with generated index.
*
@@ -1975,7 +1975,7 @@ static DEFINE_PER_CPU(struct vmap_block_queue, vmap_block_queue);
* however xarray spinlocks protect against any contention that remains.
*/
static struct xarray *
-addr_to_vb_xarray(unsigned long addr)
+addr_to_vb_xa(unsigned long addr)
{
int index = (addr / VMAP_BLOCK_SIZE) % num_possible_cpus();
@@ -2052,7 +2052,7 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
bitmap_set(vb->used_map, 0, (1UL << order));
INIT_LIST_HEAD(&vb->free_list);
- xa = addr_to_vb_xarray(va->va_start);
+ xa = addr_to_vb_xa(va->va_start);
vb_idx = addr_to_vb_idx(va->va_start);
err = xa_insert(xa, vb_idx, vb, gfp_mask);
if (err) {
@@ -2074,7 +2074,7 @@ static void free_vmap_block(struct vmap_block *vb)
struct vmap_block *tmp;
struct xarray *xa;
- xa = addr_to_vb_xarray(vb->va->va_start);
+ xa = addr_to_vb_xa(vb->va->va_start);
tmp = xa_erase(xa, addr_to_vb_idx(vb->va->va_start));
BUG_ON(tmp != vb);
@@ -2197,7 +2197,7 @@ static void vb_free(unsigned long addr, unsigned long size)
order = get_order(size);
offset = (addr & (VMAP_BLOCK_SIZE - 1)) >> PAGE_SHIFT;
- xa = addr_to_vb_xarray(addr);
+ xa = addr_to_vb_xa(addr);
vb = xa_load(xa, addr_to_vb_idx(addr));
spin_lock(&vb->lock);
@@ -3596,7 +3596,7 @@ static size_t vmap_ram_vread_iter(struct iov_iter *iter, const char *addr,
* Area is split into regions and tracked with vmap_block, read out
* each region and zero fill the hole between regions.
*/
- xa = addr_to_vb_xarray((unsigned long) addr);
+ xa = addr_to_vb_xa((unsigned long) addr);
vb = xa_load(xa, addr_to_vb_idx((unsigned long)addr));
if (!vb)
goto finished_zero;