From: Peter Hurley Date: Wed, 5 Nov 2014 17:12:56 +0000 (-0500) Subject: tty: Simplify pty pair teardown logic X-Git-Tag: omap-for-v3.19/fixes-rc1~86^2~181 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=324c1650ca2d6c1325afbb53d1187e63bbeaad0b;p=pandora-kernel.git tty: Simplify pty pair teardown logic When the slave side closes and its tty count is 0, the pty pair can be destroyed; the master side must have already closed for the slave side tty count to be 0. Thus, only the pty master close must check if the slave side has closed by checking the slave tty count. Remove the pre-computed closing flags and check the actual count(s). Regular ttys are unaffected by this change. Reviewed-by: Alan Cox Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed