Skip to content

Commit ed06982

Browse files
ebiggersgregkh
authored andcommitted
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: Eric Biggers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2c523b3 commit ed06982

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/tty/tty_io.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,7 @@ void tty_kclose(struct tty_struct *tty)
15891589
tty_debug_hangup(tty, "freeing structure\n");
15901590
/*
15911591
* The release_tty function takes care of the details of clearing
1592-
* the slots and preserving the termios structure. The tty_unlock_pair
1593-
* should be safe as we keep a kref while the tty is locked (so the
1594-
* unlock never unlocks a freed tty).
1592+
* the slots and preserving the termios structure.
15951593
*/
15961594
mutex_lock(&tty_mutex);
15971595
tty_port_set_kopened(tty->port, 0);
@@ -1621,9 +1619,7 @@ void tty_release_struct(struct tty_struct *tty, int idx)
16211619
tty_debug_hangup(tty, "freeing structure\n");
16221620
/*
16231621
* The release_tty function takes care of the details of clearing
1624-
* the slots and preserving the termios structure. The tty_unlock_pair
1625-
* should be safe as we keep a kref while the tty is locked (so the
1626-
* unlock never unlocks a freed tty).
1622+
* the slots and preserving the termios structure.
16271623
*/
16281624
mutex_lock(&tty_mutex);
16291625
release_tty(tty, idx);

0 commit comments

Comments
 (0)