mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
[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 <levon@movementarian.org> Cc: Philippe Elie <phil.el@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
09114eb8c5
commit
47ba87e0b1
2 changed files with 4 additions and 0 deletions
|
@ -743,7 +743,9 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
|
||||||
dentry->d_op = NULL;
|
dentry->d_op = NULL;
|
||||||
dentry->d_fsdata = NULL;
|
dentry->d_fsdata = NULL;
|
||||||
dentry->d_mounted = 0;
|
dentry->d_mounted = 0;
|
||||||
|
#ifdef CONFIG_PROFILING
|
||||||
dentry->d_cookie = NULL;
|
dentry->d_cookie = NULL;
|
||||||
|
#endif
|
||||||
INIT_HLIST_NODE(&dentry->d_hash);
|
INIT_HLIST_NODE(&dentry->d_hash);
|
||||||
INIT_LIST_HEAD(&dentry->d_lru);
|
INIT_LIST_HEAD(&dentry->d_lru);
|
||||||
INIT_LIST_HEAD(&dentry->d_subdirs);
|
INIT_LIST_HEAD(&dentry->d_subdirs);
|
||||||
|
|
|
@ -108,7 +108,9 @@ struct dentry {
|
||||||
struct dentry_operations *d_op;
|
struct dentry_operations *d_op;
|
||||||
struct super_block *d_sb; /* The root of the dentry tree */
|
struct super_block *d_sb; /* The root of the dentry tree */
|
||||||
void *d_fsdata; /* fs-specific data */
|
void *d_fsdata; /* fs-specific data */
|
||||||
|
#ifdef CONFIG_PROFILING
|
||||||
struct dcookie_struct *d_cookie; /* cookie, if any */
|
struct dcookie_struct *d_cookie; /* cookie, if any */
|
||||||
|
#endif
|
||||||
int d_mounted;
|
int d_mounted;
|
||||||
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
|
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue