Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3f13debd593dbd7242a4ecf6c9b4d529805e5a0
Commit:     b3f13debd593dbd7242a4ecf6c9b4d529805e5a0
Parent:     a2db8dfce8d94fecae50128d912fec7980687a51
Author:     Dan Carpenter <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:35:09 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:53 2006 -0800

    [PATCH] tty_io.c balance tty_ldisc_ref()
    
    tty_ldisc_deref() should only be called when tty_ldisc_ref() succeeds
    otherwise it triggers a BUG().  There's already a function
    tty_ldisc_flush() that flushes properly.
    
    Signed-off-by: Dan Carpenter <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/tty_io.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index a928f6a..47a6eac 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3335,18 +3335,13 @@ static void __do_SAK(struct work_struct *work)
        int session;
        int             i;
        struct file     *filp;
-       struct tty_ldisc *disc;
        struct fdtable *fdt;
        
        if (!tty)
                return;
        session = tty->session;
        
-       /* We don't want an ldisc switch during this */
-       disc = tty_ldisc_ref(tty);
-       if (disc && disc->flush_buffer)
-               disc->flush_buffer(tty);
-       tty_ldisc_deref(disc);
+       tty_ldisc_flush(tty);
 
        if (tty->driver->flush_buffer)
                tty->driver->flush_buffer(tty);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to