From: Linus Torvalds Date: Fri, 23 Nov 2007 20:30:44 +0000 (-0500) Subject: Import 2.3.43pre4 X-Git-Tag: 2.3.43pre4 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=b616a02cdcbbeb0e4eac5eb6a741b9da0edc3306;p=history.git Import 2.3.43pre4 --- diff --git a/fs/select.c b/fs/select.c index e6e6958b19ae..33e54a9fae37 100644 --- a/fs/select.c +++ b/fs/select.c @@ -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(¤t->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.