aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-03-11 16:44:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-18 19:46:31 -0400
commit8842dda2366d3d0c97646102768831f9b0ffd712 (patch)
tree4288315abbbe71ee92b55e69ddb70b48d6af75d4 /drivers/tty/tty_io.c
parentfc575ee6eadbcac757e3216e230b6fab1ba5b140 (diff)
tty: Don't protect atomic operation with mutex
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>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index f6ce2c5fbe5b..6afca98fae21 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1391,9 +1391,7 @@ static int tty_reopen(struct tty_struct *tty)
1391 } 1391 }
1392 tty->count++; 1392 tty->count++;
1393 1393
1394 mutex_lock(&tty->ldisc_mutex);
1395 WARN_ON(!test_bit(TTY_LDISC, &tty->flags)); 1394 WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
1396 mutex_unlock(&tty->ldisc_mutex);
1397 1395
1398 return 0; 1396 return 0;
1399} 1397}