Skip to content

Commit

Permalink
tty: Don't protect atomic operation with mutex
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Mar 18, 2013
1 parent fc575ee commit 8842dda
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8842dda

Please sign in to comment.