diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2005-10-30 15:02:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 17:37:19 -0800 |
commit | 2f51201662b28dbf8c15fb7eb972bc51c6cc3fa5 (patch) | |
tree | 96826df796058560bc5dd1f7d8d476c5a741d7bc /security/selinux | |
parent | 503af334ecf23b9d65d2ff0cc759f3a0bf338290 (diff) | |
download | linux-2f51201662b28dbf8c15fb7eb972bc51c6cc3fa5.tar.bz2 |
[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 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 2 | ||||
-rw-r--r-- | security/selinux/selinuxfs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index d50d7a782cf5..bb62838be496 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1609,7 +1609,7 @@ static inline void flush_unauthorized_files(struct files_struct * files) if (tty) { file_list_lock(); - file = list_entry(tty->tty_files.next, typeof(*file), f_list); + file = list_entry(tty->tty_files.next, typeof(*file), f_u.fu_list); if (file) { /* Revalidate access to controlling tty. Use inode_has_perm on the tty inode directly rather diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 7a387fec2a0c..fdc382389720 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -914,7 +914,7 @@ static void sel_remove_bools(struct dentry *de) file_list_lock(); list_for_each(p, &sb->s_files) { - struct file * filp = list_entry(p, struct file, f_list); + struct file * filp = list_entry(p, struct file, f_u.fu_list); struct dentry * dentry = filp->f_dentry; if (dentry->d_parent != de) { |