|
@@ -756,18 +756,17 @@ static void tty_ldisc_kill(struct tty_struct *tty)
|
|
|
|
|
|
/**
|
|
|
* tty_ldisc_release - release line discipline
|
|
|
- * @tty: tty being shut down
|
|
|
- * @o_tty: pair tty for pty/tty pairs
|
|
|
- *
|
|
|
- * Called during the final close of a tty/pty pair in order to shut down
|
|
|
- * the line discpline layer. On exit the ldisc assigned is N_TTY and the
|
|
|
- * ldisc has not been opened.
|
|
|
+ * @tty: tty being shut down (or one end of pty pair)
|
|
|
*
|
|
|
- * Holding ldisc_sem write lock serializes tty->ldisc changes.
|
|
|
+ * Called during the final close of a tty or a pty pair in order to shut
|
|
|
+ * down the line discpline layer. On exit, each ldisc assigned is N_TTY and
|
|
|
+ * each ldisc has not been opened.
|
|
|
*/
|
|
|
|
|
|
-void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
|
|
|
+void tty_ldisc_release(struct tty_struct *tty)
|
|
|
{
|
|
|
+ struct tty_struct *o_tty = tty->link;
|
|
|
+
|
|
|
/*
|
|
|
* Shutdown this line discipline. As this is the final close,
|
|
|
* it does not race with the set_ldisc code path.
|