Commit 83c67571b372c4a40023a84e183fdb7fa4e89e48

Authored by Jiri Slaby
Committed by Greg Kroah-Hartman
1 parent c831cff256

TTY: tty_io, annotate locking functions

tty_write_lock and tty_write_unlock contain imbalanced locking. But
this is intentional, so mark them appropriately by
__acquires/__releases.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/tty/tty_io.c
... ... @@ -962,12 +962,14 @@
962 962 }
963 963  
964 964 void tty_write_unlock(struct tty_struct *tty)
  965 + __releases(&tty->atomic_write_lock)
965 966 {
966 967 mutex_unlock(&tty->atomic_write_lock);
967 968 wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
968 969 }
969 970  
970 971 int tty_write_lock(struct tty_struct *tty, int ndelay)
  972 + __acquires(&tty->atomic_write_lock)
971 973 {
972 974 if (!mutex_trylock(&tty->atomic_write_lock)) {
973 975 if (ndelay)