提交 99cceb4e 编写于 作者: A Alan Cox 提交者: Greg Kroah-Hartman

vt: waitevent is self locked so drop the tty_lock

Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 20f62579
...@@ -130,7 +130,7 @@ static void vt_event_wait(struct vt_event_wait *vw) ...@@ -130,7 +130,7 @@ static void vt_event_wait(struct vt_event_wait *vw)
list_add(&vw->list, &vt_events); list_add(&vw->list, &vt_events);
spin_unlock_irqrestore(&vt_event_lock, flags); spin_unlock_irqrestore(&vt_event_lock, flags);
/* Wait for it to pass */ /* Wait for it to pass */
wait_event_interruptible_tty(vt_event_waitqueue, vw->done); wait_event_interruptible(vt_event_waitqueue, vw->done);
/* Dequeue it */ /* Dequeue it */
spin_lock_irqsave(&vt_event_lock, flags); spin_lock_irqsave(&vt_event_lock, flags);
list_del(&vw->list); list_del(&vw->list);
...@@ -671,11 +671,8 @@ int vt_ioctl(struct tty_struct *tty, ...@@ -671,11 +671,8 @@ int vt_ioctl(struct tty_struct *tty,
return -EPERM; return -EPERM;
if (arg == 0 || arg > MAX_NR_CONSOLES) if (arg == 0 || arg > MAX_NR_CONSOLES)
ret = -ENXIO; ret = -ENXIO;
else { else
tty_lock();
ret = vt_waitactive(arg); ret = vt_waitactive(arg);
tty_unlock();
}
break; break;
/* /*
...@@ -1426,14 +1423,10 @@ int vt_move_to_console(unsigned int vt, int alloc) ...@@ -1426,14 +1423,10 @@ int vt_move_to_console(unsigned int vt, int alloc)
return -EIO; return -EIO;
} }
console_unlock(); console_unlock();
/* Review: I don't see why we need tty_lock here FIXME */
tty_lock();
if (vt_waitactive(vt + 1)) { if (vt_waitactive(vt + 1)) {
pr_debug("Suspend: Can't switch VCs."); pr_debug("Suspend: Can't switch VCs.");
tty_unlock();
return -EINTR; return -EINTR;
} }
tty_unlock();
return prev; return prev;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册