tty: Don't protect atomic operation with mutex
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Mar 2013 20:44:39 +0000 (16:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:46:31 +0000 (16:46 -0700)
test_bit() is already atomic; drop mutex lock/unlock.

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

index f6ce2c5..6afca98 100644 (file)
@@ -1391,9 +1391,7 @@ static int tty_reopen(struct tty_struct *tty)
        }
        tty->count++;
 
-       mutex_lock(&tty->ldisc_mutex);
        WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
-       mutex_unlock(&tty->ldisc_mutex);
 
        return 0;
 }