Make sure the linux_wait_event_common() function in the LinuxKPI properly
handles a timeout value of MAX_SCHEDULE_TIMEOUT which basically means there is no timeout. This is a regression issue after r319757. While at it change the type of returned variable from "long" to "int" to match the actual return type. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
aa6a25dc8e
commit
8ea4441598
@ -213,13 +213,19 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_queue_t *wq, int timeout,
|
||||
unsigned int state, spinlock_t *lock)
|
||||
{
|
||||
struct task_struct *task;
|
||||
long ret;
|
||||
int ret;
|
||||
|
||||
if (lock != NULL)
|
||||
spin_unlock_irq(lock);
|
||||
|
||||
DROP_GIANT();
|
||||
|
||||
/* range check timeout */
|
||||
if (timeout < 1)
|
||||
timeout = 1;
|
||||
else if (timeout == MAX_SCHEDULE_TIMEOUT)
|
||||
timeout = 0;
|
||||
|
||||
task = current;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user