diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-01-30 15:14:32 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-02 18:10:46 -0500 |
commit | d3bda5298aad98c7a27678bdd0dd9d008ab9e685 (patch) | |
tree | 40b098fd53e4f811277e9e215ec477c3da2856ea /drivers/tty/pty.c | |
parent | a50f724a432997321cabb6c9e665c28e34850f78 (diff) |
TTY: get rid of BTM around devpts_*
devpts operations are protected by inode mutexes and dentry
refcounting. There is no need to hold BTM.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index ddec9f3c3396..39afd045f8ef 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -54,8 +54,8 @@ static void pty_close(struct tty_struct *tty, struct file *filp) | |||
54 | wake_up_interruptible(&tty->link->write_wait); | 54 | wake_up_interruptible(&tty->link->write_wait); |
55 | if (tty->driver->subtype == PTY_TYPE_MASTER) { | 55 | if (tty->driver->subtype == PTY_TYPE_MASTER) { |
56 | set_bit(TTY_OTHER_CLOSED, &tty->flags); | 56 | set_bit(TTY_OTHER_CLOSED, &tty->flags); |
57 | devpts_pty_kill(tty->link); | ||
58 | tty_unlock(); | 57 | tty_unlock(); |
58 | devpts_pty_kill(tty->link); | ||
59 | tty_vhangup(tty->link); | 59 | tty_vhangup(tty->link); |
60 | tty_lock(); | 60 | tty_lock(); |
61 | } | 61 | } |
@@ -613,9 +613,7 @@ static int ptmx_open(struct inode *inode, struct file *filp) | |||
613 | return retval; | 613 | return retval; |
614 | 614 | ||
615 | /* find a device that is not in use. */ | 615 | /* find a device that is not in use. */ |
616 | tty_lock(); | ||
617 | index = devpts_new_index(inode); | 616 | index = devpts_new_index(inode); |
618 | tty_unlock(); | ||
619 | if (index < 0) { | 617 | if (index < 0) { |
620 | retval = index; | 618 | retval = index; |
621 | goto err_file; | 619 | goto err_file; |
@@ -650,8 +648,8 @@ err_release: | |||
650 | tty_release(inode, filp); | 648 | tty_release(inode, filp); |
651 | return retval; | 649 | return retval; |
652 | out: | 650 | out: |
653 | devpts_kill_index(inode, index); | ||
654 | tty_unlock(); | 651 | tty_unlock(); |
652 | devpts_kill_index(inode, index); | ||
655 | err_file: | 653 | err_file: |
656 | tty_free_file(filp); | 654 | tty_free_file(filp); |
657 | return retval; | 655 | return retval; |