From: Marcelo Tosatti Date: Fri, 3 Feb 2006 11:04:06 +0000 (-0800) Subject: [PATCH] make "struct d_cookie" depend on CONFIG_PROFILING X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47ba87e0b1269698801310bfd1716b0538282405;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] make "struct d_cookie" depend on CONFIG_PROFILING Shrinks "struct dentry" from 128 bytes to 124 on x86, allowing 31 objects per slab instead of 30. Cc: John Levon Cc: Philippe Elie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/dcache.c b/fs/dcache.c index 86bdb93789c..a173bba3266 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -743,7 +743,9 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name) dentry->d_op = NULL; dentry->d_fsdata = NULL; dentry->d_mounted = 0; +#ifdef CONFIG_PROFILING dentry->d_cookie = NULL; +#endif INIT_HLIST_NODE(&dentry->d_hash); INIT_LIST_HEAD(&dentry->d_lru); INIT_LIST_HEAD(&dentry->d_subdirs); diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a3ed5e059d4..a3f09947940 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -108,7 +108,9 @@ struct dentry { struct dentry_operations *d_op; struct super_block *d_sb; /* The root of the dentry tree */ void *d_fsdata; /* fs-specific data */ +#ifdef CONFIG_PROFILING struct dcookie_struct *d_cookie; /* cookie, if any */ +#endif int d_mounted; unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ };