diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-23 17:13:43 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-23 17:13:43 -0500 |
commit | 88e3c1da8b3258a81c5c81d4e7e22557b7d71ba7 (patch) | |
tree | ab518773c0ff4606f1a57d00b5931332a7e1d96e /drivers/char/n_tty.c | |
parent | fa4fa40a990f8f4eff65476bef32007c154bbac0 (diff) | |
parent | b0e6e962992b76580f4900b166a337bad7c1e81b (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index ccad7ae94541..ede365d05387 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -132,7 +132,7 @@ static void put_tty_queue(unsigned char c, struct tty_struct *tty) | |||
132 | * We test the TTY_THROTTLED bit first so that it always | 132 | * We test the TTY_THROTTLED bit first so that it always |
133 | * indicates the current state. The decision about whether | 133 | * indicates the current state. The decision about whether |
134 | * it is worth allowing more input has been taken by the caller. | 134 | * it is worth allowing more input has been taken by the caller. |
135 | * Can sleep, may be called under the atomic_read semaphore but | 135 | * Can sleep, may be called under the atomic_read_lock mutex but |
136 | * this is not guaranteed. | 136 | * this is not guaranteed. |
137 | */ | 137 | */ |
138 | 138 | ||
@@ -1132,7 +1132,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt) | |||
1132 | * buffer, and once to drain the space from the (physical) beginning of | 1132 | * buffer, and once to drain the space from the (physical) beginning of |
1133 | * the buffer to head pointer. | 1133 | * the buffer to head pointer. |
1134 | * | 1134 | * |
1135 | * Called under the tty->atomic_read sem and with TTY_DONT_FLIP set | 1135 | * Called under the tty->atomic_read_lock sem and with TTY_DONT_FLIP set |
1136 | * | 1136 | * |
1137 | */ | 1137 | */ |
1138 | 1138 | ||
@@ -1262,11 +1262,11 @@ do_it_again: | |||
1262 | * Internal serialization of reads. | 1262 | * Internal serialization of reads. |
1263 | */ | 1263 | */ |
1264 | if (file->f_flags & O_NONBLOCK) { | 1264 | if (file->f_flags & O_NONBLOCK) { |
1265 | if (down_trylock(&tty->atomic_read)) | 1265 | if (!mutex_trylock(&tty->atomic_read_lock)) |
1266 | return -EAGAIN; | 1266 | return -EAGAIN; |
1267 | } | 1267 | } |
1268 | else { | 1268 | else { |
1269 | if (down_interruptible(&tty->atomic_read)) | 1269 | if (mutex_lock_interruptible(&tty->atomic_read_lock)) |
1270 | return -ERESTARTSYS; | 1270 | return -ERESTARTSYS; |
1271 | } | 1271 | } |
1272 | 1272 | ||
@@ -1393,7 +1393,7 @@ do_it_again: | |||
1393 | timeout = time; | 1393 | timeout = time; |
1394 | } | 1394 | } |
1395 | clear_bit(TTY_DONT_FLIP, &tty->flags); | 1395 | clear_bit(TTY_DONT_FLIP, &tty->flags); |
1396 | up(&tty->atomic_read); | 1396 | mutex_unlock(&tty->atomic_read_lock); |
1397 | remove_wait_queue(&tty->read_wait, &wait); | 1397 | remove_wait_queue(&tty->read_wait, &wait); |
1398 | 1398 | ||
1399 | if (!waitqueue_active(&tty->read_wait)) | 1399 | if (!waitqueue_active(&tty->read_wait)) |