mm: slub: introduce virt_to_obj function
authorAndrey Ryabinin <[email protected]>
Fri, 13 Feb 2015 22:39:31 +0000 (14:39 -0800)
committerLinus Torvalds <[email protected]>
Sat, 14 Feb 2015 05:21:41 +0000 (21:21 -0800)
commit912f5fbf1d3060f25d6994aed0265c55b974b2e9
treea71bc9984280ac97e3ef09daf7cad86dc77a97e5
parentb8c73fc2493d42517be95cf2c89659fc6c6f4d02
mm: slub: introduce virt_to_obj function

virt_to_obj takes kmem_cache address, address of slab page, address x
pointing somewhere inside slab object, and returns address of the
beginning of object.

Signed-off-by: Andrey Ryabinin <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Konstantin Serebryany <[email protected]>
Cc: Dmitry Chernenkov <[email protected]>
Signed-off-by: Andrey Konovalov <[email protected]>
Cc: Yuri Gribov <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/slub_def.h