mm: remove reset of pcp->counter in pageset_init()
authorWei Yang <[email protected]>
Fri, 28 Dec 2018 08:34:16 +0000 (00:34 -0800)
committerLinus Torvalds <[email protected]>
Fri, 28 Dec 2018 20:11:47 +0000 (12:11 -0800)
per_cpu_pageset is cleared by memset, it is not necessary to reset it
again.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page_alloc.c

index ce9e88577bde04e9718b2afbf1abedcd519ba0cc..c82c41edfe226e0e9c289379cb13a38d06878f08 100644 (file)
@@ -5737,7 +5737,6 @@ static void pageset_init(struct per_cpu_pageset *p)
        memset(p, 0, sizeof(*p));
 
        pcp = &p->pcp;
-       pcp->count = 0;
        for (migratetype = 0; migratetype < MIGRATE_PCPTYPES; migratetype++)
                INIT_LIST_HEAD(&pcp->lists[migratetype]);
 }