tty: Remove unnecessary re-test of ldisc ref count
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Mar 2013 20:44:25 +0000 (16:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:32:46 +0000 (16:32 -0700)
commit2276ad9765b395577442d6ddf748f72c329234ae
tree2bb38f14940040b468df429487b1377ec3810494
parent168942c9fa01916173a7b72ac67e1d218d571013
tty: Remove unnecessary re-test of ldisc ref count

Since the tty->ldisc is prevented from being changed by tty_set_ldisc()
when a tty is being hung up, re-testing the ldisc user count is
unnecessary -- ie, it cannot be a different ldisc and the user count
cannot have increased (assuming the caller meets the precondition that
TTY_LDISC flag is cleared)

Removal of the 'early-out' locking optimization is necessary for
the subsequent patch 'tty: Fix ldisc halt sequence on hangup'.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_ldisc.c