diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2005-10-30 18:02:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:19 -0500 |
commit | 2f51201662b28dbf8c15fb7eb972bc51c6cc3fa5 (patch) | |
tree | 96826df796058560bc5dd1f7d8d476c5a741d7bc /fs/dquot.c | |
parent | 503af334ecf23b9d65d2ff0cc759f3a0bf338290 (diff) |
[PATCH] reduce sizeof(struct file)
Now that RCU applied on 'struct file' seems stable, we can place f_rcuhead
in a memory location that is not anymore used at call_rcu(&f->f_rcuhead,
file_free_rcu) time, to reduce the size of this critical kernel object.
The trick I used is to move f_rcuhead and f_list in an union called f_u
The callers are changed so that f_rcuhead becomes f_u.fu_rcuhead and f_list
becomes f_u.f_list
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r-- | fs/dquot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index 05f3327d64a3..ea7644227a65 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -662,7 +662,7 @@ static void add_dquot_ref(struct super_block *sb, int type) | |||
662 | restart: | 662 | restart: |
663 | file_list_lock(); | 663 | file_list_lock(); |
664 | list_for_each(p, &sb->s_files) { | 664 | list_for_each(p, &sb->s_files) { |
665 | struct file *filp = list_entry(p, struct file, f_list); | 665 | struct file *filp = list_entry(p, struct file, f_u.fu_list); |
666 | struct inode *inode = filp->f_dentry->d_inode; | 666 | struct inode *inode = filp->f_dentry->d_inode; |
667 | if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) { | 667 | if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) { |
668 | struct dentry *dentry = dget(filp->f_dentry); | 668 | struct dentry *dentry = dget(filp->f_dentry); |