Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267317
b: refs/heads/master
c: a57a7bf
h: refs/heads/master
i:
  267315: 1dbcebc
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Aug 25, 2011
1 parent bee6bcb commit e3ce443
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bafb0bd24d7e0e0124318625b239a55d58c757a2
refs/heads/master: a57a7bf3fc7eff00f07eb9c805774d911a3f2472
18 changes: 18 additions & 0 deletions trunk/include/linux/tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,24 @@ extern long vt_compat_ioctl(struct tty_struct *tty,
extern void __lockfunc tty_lock(void) __acquires(tty_lock);
extern void __lockfunc tty_unlock(void) __releases(tty_lock);

/*
* this shall be called only from where BTM is held (like close)
*
* We need this to ensure nobody waits for us to finish while we are waiting.
* Without this we were encountering system stalls.
*
* This should be indeed removed with BTM removal later.
*
* Locking: BTM required. Nobody is allowed to hold port->mutex.
*/
static inline void tty_wait_until_sent_from_close(struct tty_struct *tty,
long timeout)
{
tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */
tty_wait_until_sent(tty, timeout);
tty_lock();
}

/*
* wait_event_interruptible_tty -- wait for a condition with the tty lock held
*
Expand Down

0 comments on commit e3ce443

Please sign in to comment.