Skip to content

Commit b8e748b

Browse files
Zhang Yanfeitorvalds
authored andcommitted
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>
1 parent 9da3f59 commit b8e748b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

mm/vmalloc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,6 @@ struct vmap_block {
754754
struct vmap_area *va;
755755
struct vmap_block_queue *vbq;
756756
unsigned long free, dirty;
757-
DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS);
758757
DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS);
759758
struct list_head free_list;
760759
struct rcu_head rcu_head;
@@ -820,7 +819,6 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
820819
vb->va = va;
821820
vb->free = VMAP_BBMAP_BITS;
822821
vb->dirty = 0;
823-
bitmap_zero(vb->alloc_map, VMAP_BBMAP_BITS);
824822
bitmap_zero(vb->dirty_map, VMAP_BBMAP_BITS);
825823
INIT_LIST_HEAD(&vb->free_list);
826824

@@ -873,7 +871,6 @@ static void purge_fragmented_blocks(int cpu)
873871
if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) {
874872
vb->free = 0; /* prevent further allocs after releasing lock */
875873
vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */
876-
bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS);
877874
bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS);
878875
spin_lock(&vbq->lock);
879876
list_del_rcu(&vb->free_list);

0 commit comments

Comments
 (0)