lkml.org 
[lkml]   [2014]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC/PATCH v2 04/10] mm: slub: introduce virt_to_obj function.
    On 09/11/2014 12:32 AM, Andrey Ryabinin wrote:
    > 2014-09-10 20:16 GMT+04:00 Christoph Lameter <cl@linux.com>:
    >> On Wed, 10 Sep 2014, Andrey Ryabinin wrote:
    >>
    >>> virt_to_obj takes kmem_cache address, address of slab page,
    >>> address x pointing somewhere inside slab object,
    >>> and returns address of the begging of object.
    >>
    >> This function is SLUB specific. Does it really need to be in slab.h?
    >>
    >
    > Oh, yes this should be in slub.c
    >

    I forgot that include/linux/slub_def.h exists. Perhaps it would be better to move
    virt_to_obj into slub_def.h to avoid ugly #ifdef CONFIG_KASAN in slub.c



    \
     
     \ /
      Last update: 2014-09-15 10:01    [W:4.133 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site