Support procfs inode defragmentation Cc: Alexey Dobriyan Reviewed-by: Rik van Riel Signed-off-by: Christoph Lameter Signed-off-by: Christoph Lameter --- fs/proc/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: linux-2.6/fs/proc/inode.c =================================================================== --- linux-2.6.orig/fs/proc/inode.c 2009-12-18 13:13:24.000000000 -0600 +++ linux-2.6/fs/proc/inode.c 2010-01-29 10:33:22.000000000 -0600 @@ -77,6 +77,12 @@ static void init_once(void *foo) inode_init_once(&ei->vfs_inode); } +static void *proc_get_inodes(struct kmem_cache *s, int nr, void **v) +{ + return fs_get_inodes(s, nr, v, + offsetof(struct proc_inode, vfs_inode)); +} + void __init proc_init_inodecache(void) { proc_inode_cachep = kmem_cache_create("proc_inode_cache", @@ -84,6 +90,8 @@ void __init proc_init_inodecache(void) 0, (SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD|SLAB_PANIC), init_once); + kmem_cache_setup_defrag(proc_inode_cachep, + proc_get_inodes, kick_inodes) } static const struct super_operations proc_sops = { -- -- 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/