aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2005-10-30 18:02:16 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:19 -0500
commit2f51201662b28dbf8c15fb7eb972bc51c6cc3fa5 (patch)
tree96826df796058560bc5dd1f7d8d476c5a741d7bc /drivers/char/tty_io.c
parent503af334ecf23b9d65d2ff0cc759f3a0bf338290 (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 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index f5649a337743..c586bfa852ee 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -809,7 +809,7 @@ static void do_tty_hangup(void *data)
809 check_tty_count(tty, "do_tty_hangup"); 809 check_tty_count(tty, "do_tty_hangup");
810 file_list_lock(); 810 file_list_lock();
811 /* This breaks for file handles being sent over AF_UNIX sockets ? */ 811 /* This breaks for file handles being sent over AF_UNIX sockets ? */
812 list_for_each_entry(filp, &tty->tty_files, f_list) { 812 list_for_each_entry(filp, &tty->tty_files, f_u.fu_list) {
813 if (filp->f_op->write == redirected_tty_write) 813 if (filp->f_op->write == redirected_tty_write)
814 cons_filp = filp; 814 cons_filp = filp;
815 if (filp->f_op->write != tty_write) 815 if (filp->f_op->write != tty_write)