Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289274
b: refs/heads/master
c: d3bda52
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Feb 2, 2012
1 parent d6b1565 commit 7653c14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a50f724a432997321cabb6c9e665c28e34850f78
refs/heads/master: d3bda5298aad98c7a27678bdd0dd9d008ab9e685
6 changes: 2 additions & 4 deletions trunk/drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
wake_up_interruptible(&tty->link->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) {
set_bit(TTY_OTHER_CLOSED, &tty->flags);
devpts_pty_kill(tty->link);
tty_unlock();
devpts_pty_kill(tty->link);
tty_vhangup(tty->link);
tty_lock();
}
Expand Down Expand Up @@ -613,9 +613,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
return retval;

/* find a device that is not in use. */
tty_lock();
index = devpts_new_index(inode);
tty_unlock();
if (index < 0) {
retval = index;
goto err_file;
Expand Down Expand Up @@ -650,8 +648,8 @@ static int ptmx_open(struct inode *inode, struct file *filp)
tty_release(inode, filp);
return retval;
out:
devpts_kill_index(inode, index);
tty_unlock();
devpts_kill_index(inode, index);
err_file:
tty_free_file(filp);
return retval;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1789,11 +1789,11 @@ int tty_release(struct inode *inode, struct file *filp)
* the slots and preserving the termios structure.
*/
release_tty(tty, idx);
tty_unlock();

/* Make this pty number available for reallocation */
if (devpts)
devpts_kill_index(inode, idx);
tty_unlock();
return 0;
}

Expand Down

0 comments on commit 7653c14

Please sign in to comment.