From bc4f610d5a884eedfeac3b08f2ac87df74a1e55f Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Fri, 6 Nov 2015 16:29:44 -0800 Subject: slab, slub: use page->rcu_head instead of page->lru plus cast We have properly typed page->rcu_head, no need to cast page->lru. Signed-off-by: Kirill A. Shutemov Reviewed-by: Andrea Arcangeli Acked-by: Christoph Lameter Cc: "Paul E. McKenney" Cc: Andi Kleen Cc: Aneesh Kumar K.V Cc: David Rientjes Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Michal Hocko Cc: Sergey Senozhatsky Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/slub.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mm/slub.c') diff --git a/mm/slub.c b/mm/slub.c index 97695622a858..7cb4bf9ae320 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1507,10 +1507,7 @@ static void free_slab(struct kmem_cache *s, struct page *page) VM_BUG_ON(s->reserved != sizeof(*head)); head = page_address(page) + offset; } else { - /* - * RCU free overloads the RCU head over the LRU - */ - head = (void *)&page->lru; + head = &page->rcu_head; } call_rcu(head, rcu_free_slab); -- cgit v1.2.3