From: Peter Hurley Date: Mon, 11 Mar 2013 20:44:39 +0000 (-0400) Subject: tty: Don't protect atomic operation with mutex X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8842dda2366d3d0c97646102768831f9b0ffd712;p=linux-beck.git tty: Don't protect atomic operation with mutex test_bit() is already atomic; drop mutex lock/unlock. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- 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) } tty->count++; - mutex_lock(&tty->ldisc_mutex); WARN_ON(!test_bit(TTY_LDISC, &tty->flags)); - mutex_unlock(&tty->ldisc_mutex); return 0; }