aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_ldisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/tty_ldisc.c')
-rw-r--r--drivers/tty/tty_ldisc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index e6156c60d19..3d0687197d0 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -912,7 +912,6 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
912 * race with the set_ldisc code path. 912 * race with the set_ldisc code path.
913 */ 913 */
914 914
915 tty_unlock();
916 tty_ldisc_halt(tty); 915 tty_ldisc_halt(tty);
917 tty_ldisc_flush_works(tty); 916 tty_ldisc_flush_works(tty);
918 tty_lock(); 917 tty_lock();
@@ -930,6 +929,8 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
930 tty_set_termios_ldisc(tty, N_TTY); 929 tty_set_termios_ldisc(tty, N_TTY);
931 mutex_unlock(&tty->ldisc_mutex); 930 mutex_unlock(&tty->ldisc_mutex);
932 931
932 tty_unlock();
933
933 /* This will need doing differently if we need to lock */ 934 /* This will need doing differently if we need to lock */
934 if (o_tty) 935 if (o_tty)
935 tty_ldisc_release(o_tty, NULL); 936 tty_ldisc_release(o_tty, NULL);