Commit ed069827 authored by Eric Biggers's avatar Eric Biggers Committed by Greg Kroah-Hartman

tty: drop outdated comments about release_tty() locking

The current version of the TTY code unlocks the tty_struct(s) before
release_tty() rather than after.  Moreover, tty_unlock_pair() no longer
exists.  Thus, remove the outdated comments regarding tty_unlock_pair().
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20200224073359.292795-1-ebiggers@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c523b34
...@@ -1589,9 +1589,7 @@ void tty_kclose(struct tty_struct *tty) ...@@ -1589,9 +1589,7 @@ void tty_kclose(struct tty_struct *tty)
tty_debug_hangup(tty, "freeing structure\n"); tty_debug_hangup(tty, "freeing structure\n");
/* /*
* The release_tty function takes care of the details of clearing * The release_tty function takes care of the details of clearing
* the slots and preserving the termios structure. The tty_unlock_pair * the slots and preserving the termios structure.
* should be safe as we keep a kref while the tty is locked (so the
* unlock never unlocks a freed tty).
*/ */
mutex_lock(&tty_mutex); mutex_lock(&tty_mutex);
tty_port_set_kopened(tty->port, 0); tty_port_set_kopened(tty->port, 0);
...@@ -1621,9 +1619,7 @@ void tty_release_struct(struct tty_struct *tty, int idx) ...@@ -1621,9 +1619,7 @@ void tty_release_struct(struct tty_struct *tty, int idx)
tty_debug_hangup(tty, "freeing structure\n"); tty_debug_hangup(tty, "freeing structure\n");
/* /*
* The release_tty function takes care of the details of clearing * The release_tty function takes care of the details of clearing
* the slots and preserving the termios structure. The tty_unlock_pair * the slots and preserving the termios structure.
* should be safe as we keep a kref while the tty is locked (so the
* unlock never unlocks a freed tty).
*/ */
mutex_lock(&tty_mutex); mutex_lock(&tty_mutex);
release_tty(tty, idx); release_tty(tty, idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment