Re: [PATCH 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-09 Thread Peter Hurley
On 11/09/2015 04:12 AM, Johannes Stezenbach wrote: > On Sun, Nov 08, 2015 at 05:02:52PM -0500, Peter Hurley wrote: >> +void tty_ldisc_closing(struct tty_struct *tty) >> +{ >> +struct tty_ldisc *ld = tty_ldisc_ref(tty); >> + >> +if (ld->ops->closing) >> +ld->ops->closing(tty); >>

Re: [PATCH 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-09 Thread Johannes Stezenbach
On Sun, Nov 08, 2015 at 05:02:52PM -0500, Peter Hurley wrote: > +void tty_ldisc_closing(struct tty_struct *tty) > +{ > + struct tty_ldisc *ld = tty_ldisc_ref(tty); > + > + if (ld->ops->closing) > + ld->ops->closing(tty); > + if (ld) > + tty_ldisc_deref(ld); > +}

[PATCH 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-08 Thread Peter Hurley
tty->closing is exclusively used to cause the N_TTY line discipline to drop further input on final tty close (except XON/XOFF output flow control changes). In turn, this prevents the line discipline from generating new tty driver i/o requests (eg., when echoing) after the tty driver has performed h