Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/vmalloc.c: remove alloc_map from vmap_block

As we have removed the dead code in the vb_alloc, it seems there is no
place to use the alloc_map. So there is no reason to maintain the
alloc_map in vmap_block.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Zhang Yanfei and committed by
Linus Torvalds
b8e748b6 9da3f59f

-3
-3
mm/vmalloc.c
··· 754 754 struct vmap_area *va; 755 755 struct vmap_block_queue *vbq; 756 756 unsigned long free, dirty; 757 - DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS); 758 757 DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS); 759 758 struct list_head free_list; 760 759 struct rcu_head rcu_head; ··· 819 820 vb->va = va; 820 821 vb->free = VMAP_BBMAP_BITS; 821 822 vb->dirty = 0; 822 - bitmap_zero(vb->alloc_map, VMAP_BBMAP_BITS); 823 823 bitmap_zero(vb->dirty_map, VMAP_BBMAP_BITS); 824 824 INIT_LIST_HEAD(&vb->free_list); 825 825 ··· 871 873 if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) { 872 874 vb->free = 0; /* prevent further allocs after releasing lock */ 873 875 vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */ 874 - bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS); 875 876 bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS); 876 877 spin_lock(&vbq->lock); 877 878 list_del_rcu(&vb->free_list);