lkml.org 
[lkml]   [2007]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 09/10] sockets: inode defragmentation support
    Signed-off-by: Christoph Lameter <clameter@sgi.com>

    ---
    net/socket.c | 13 ++++++++++++-
    1 file changed, 12 insertions(+), 1 deletion(-)

    Index: slub/net/socket.c
    ===================================================================
    --- slub.orig/net/socket.c 2007-05-18 00:54:30.000000000 -0700
    +++ slub/net/socket.c 2007-05-18 01:03:31.000000000 -0700
    @@ -264,6 +264,17 @@ static void init_once(void *foo, struct
    inode_init_once(&ei->vfs_inode);
    }

    +static void *sock_get_inodes(struct kmem_cache *s, int nr, void **v)
    +{
    + return fs_get_inodes(s, nr, v,
    + offsetof(struct socket_alloc, vfs_inode));
    +}
    +
    +static struct kmem_cache_ops sock_kmem_cache_ops = {
    + .get = sock_get_inodes,
    + .kick = kick_inodes
    +};
    +
    static int init_inodecache(void)
    {
    sock_inode_cachep = kmem_cache_create("sock_inode_cache",
    @@ -273,7 +284,7 @@ static int init_inodecache(void)
    SLAB_RECLAIM_ACCOUNT |
    SLAB_MEM_SPREAD),
    init_once,
    - NULL);
    + &sock_kmem_cache_ops);
    if (sock_inode_cachep == NULL)
    return -ENOMEM;
    return 0;
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-05-18 20:17    [W:0.059 / U:90.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site