Commit b616a02c authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.43pre4

parent b9e8c7c0
...@@ -173,11 +173,11 @@ static int max_select_fd(unsigned long n, fd_set_bits *fds) ...@@ -173,11 +173,11 @@ static int max_select_fd(unsigned long n, fd_set_bits *fds)
int do_select(int n, fd_set_bits *fds, long *timeout) int do_select(int n, fd_set_bits *fds, long *timeout)
{ {
poll_table *wait; poll_table *wait, *orig_wait;
int retval, i, off; int retval, i, off;
long __timeout = *timeout; long __timeout = *timeout;
wait = NULL; orig_wait = wait = NULL;
read_lock(&current->files->file_lock); read_lock(&current->files->file_lock);
retval = max_select_fd(n, fds); retval = max_select_fd(n, fds);
...@@ -187,7 +187,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout) ...@@ -187,7 +187,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
return retval; return retval;
n = retval; n = retval;
if (__timeout) { if (__timeout) {
wait = alloc_wait(n); orig_wait = wait = alloc_wait(n);
if (!wait) if (!wait)
return -ENOMEM; return -ENOMEM;
} }
...@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout) ...@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
} }
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
free_wait(wait); free_wait(orig_wait);
/* /*
* Up-to-date the caller timeout. * Up-to-date the caller timeout.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment