]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/vmalloc.c: remove alloc_map from vmap_block
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Thu, 27 Jun 2013 23:52:26 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:06 +0000 (16:38 +1000)
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>
mm/vmalloc.c

index 99d045a0a0ebaf681c5f44ca2a025da7deb13026..7ac2a1f8358a9c64a7bd544789dad4e98df59941 100644 (file)
@@ -754,7 +754,6 @@ struct vmap_block {
        struct vmap_area *va;
        struct vmap_block_queue *vbq;
        unsigned long free, dirty;
-       DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS);
        DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS);
        struct list_head free_list;
        struct rcu_head rcu_head;
@@ -820,7 +819,6 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
        vb->va = va;
        vb->free = VMAP_BBMAP_BITS;
        vb->dirty = 0;
-       bitmap_zero(vb->alloc_map, VMAP_BBMAP_BITS);
        bitmap_zero(vb->dirty_map, VMAP_BBMAP_BITS);
        INIT_LIST_HEAD(&vb->free_list);
 
@@ -873,7 +871,6 @@ static void purge_fragmented_blocks(int cpu)
                if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) {
                        vb->free = 0; /* prevent further allocs after releasing lock */
                        vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */
-                       bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS);
                        bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS);
                        spin_lock(&vbq->lock);
                        list_del_rcu(&vb->free_list);