Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8842dda2 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

tty: Don't protect atomic operation with mutex



test_bit() is already atomic; drop mutex lock/unlock.

Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fc575ee6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
}