]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.43pre4 2.3.43pre4
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:30:44 +0000 (15:30 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:30:44 +0000 (15:30 -0500)
fs/select.c

index e6e6958b19ae06bb132b4eac257e36061c49eb72..33e54a9fae372e860389b6ca10bbac96d98f9a4c 100644 (file)
@@ -173,11 +173,11 @@ get_max:
 
 int do_select(int n, fd_set_bits *fds, long *timeout)
 {
-       poll_table *wait;
+       poll_table *wait, *orig_wait;
        int retval, i, off;
        long __timeout = *timeout;
 
-       wait = NULL;
+       orig_wait = wait = NULL;
 
        read_lock(&current->files->file_lock);
        retval = max_select_fd(n, fds);
@@ -187,7 +187,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
                return retval;
        n = retval;
        if (__timeout) {
-               wait = alloc_wait(n);
+               orig_wait = wait = alloc_wait(n);
                if (!wait)
                        return -ENOMEM;
        }
@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
        }
        current->state = TASK_RUNNING;
 
-       free_wait(wait);
+       free_wait(orig_wait);
 
        /*
         * Up-to-date the caller timeout.