Skip to content

Commit 153090f

Browse files
Baoquan Heakpm00
authored andcommitted
mm/vmalloc: add code comment for find_vmap_area_exceed_addr()
Its behaviour is like find_vma() which finds an area above the specified address, add comment to make it easier to understand. And also fix two places of grammer mistake/typo. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Baoquan He <[email protected]> Reviewed-by: Uladzislau Rezki (Sony) <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent baa468a commit 153090f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mm/vmalloc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ unsigned long vmalloc_nr_pages(void)
790790
return atomic_long_read(&nr_vmalloc_pages);
791791
}
792792

793+
/* Look up the first VA which satisfies addr < va_end, NULL if none. */
793794
static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr)
794795
{
795796
struct vmap_area *va = NULL;
@@ -929,7 +930,7 @@ link_va(struct vmap_area *va, struct rb_root *root,
929930
* Some explanation here. Just perform simple insertion
930931
* to the tree. We do not set va->subtree_max_size to
931932
* its current size before calling rb_insert_augmented().
932-
* It is because of we populate the tree from the bottom
933+
* It is because we populate the tree from the bottom
933934
* to parent levels when the node _is_ in the tree.
934935
*
935936
* Therefore we set subtree_max_size to zero after insertion,
@@ -1655,7 +1656,7 @@ static atomic_long_t vmap_lazy_nr = ATOMIC_LONG_INIT(0);
16551656

16561657
/*
16571658
* Serialize vmap purging. There is no actual critical section protected
1658-
* by this look, but we want to avoid concurrent calls for performance
1659+
* by this lock, but we want to avoid concurrent calls for performance
16591660
* reasons and to make the pcpu_get_vm_areas more deterministic.
16601661
*/
16611662
static DEFINE_MUTEX(vmap_purge_lock);

0 commit comments

Comments
 (0)