-
Andrew Morton authored
From: Kevin Corry <kevcorry@us.ibm.com> Some testing of DM multipath has turned up a problem with the DEVICE_WAIT command. In the tests, while performing a DEVICE_WAIT on a multipath device, the command sometimes returns immediately, even though the event-number is correct and no path-failure has occurred to trigger an event. The problem was tracked down to the call to schedule() in dev_wait(), which would return even though it was not woken up by a DM table event. This patch moves the responsibility for waiting from the ioctl interface into the core driver, and uses wait_event_interruptible() instead of relying on wait-queues and schedule(). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
52414318