提交 8842dda2 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

tty: Don't protect atomic operation with mutex

test_bit() is already atomic; drop mutex lock/unlock.
Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 fc575ee6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册