diff options
author | Jiri Slaby <jslaby@suse.cz> | 2011-04-20 04:43:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 17:19:12 -0400 |
commit | 83c67571b372c4a40023a84e183fdb7fa4e89e48 (patch) | |
tree | 3865faaf2546860e5107ac6709f39c1d352e7743 /drivers/tty | |
parent | c831cff256c86588976e66bef7897633d534846c (diff) |
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/tty_io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3f4ad988543..6556f7452ba 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -962,12 +962,14 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count, | |||
962 | } | 962 | } |
963 | 963 | ||
964 | void tty_write_unlock(struct tty_struct *tty) | 964 | void tty_write_unlock(struct tty_struct *tty) |
965 | __releases(&tty->atomic_write_lock) | ||
965 | { | 966 | { |
966 | mutex_unlock(&tty->atomic_write_lock); | 967 | mutex_unlock(&tty->atomic_write_lock); |
967 | wake_up_interruptible_poll(&tty->write_wait, POLLOUT); | 968 | wake_up_interruptible_poll(&tty->write_wait, POLLOUT); |
968 | } | 969 | } |
969 | 970 | ||
970 | int tty_write_lock(struct tty_struct *tty, int ndelay) | 971 | int tty_write_lock(struct tty_struct *tty, int ndelay) |
972 | __acquires(&tty->atomic_write_lock) | ||
971 | { | 973 | { |
972 | if (!mutex_trylock(&tty->atomic_write_lock)) { | 974 | if (!mutex_trylock(&tty->atomic_write_lock)) { |
973 | if (ndelay) | 975 | if (ndelay) |