aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/select.c b/fs/select.c
index dcbc1112b7ec..fe0893afd931 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -311,7 +311,7 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
311{ 311{
312 fd_set_bits fds; 312 fd_set_bits fds;
313 void *bits; 313 void *bits;
314 int ret, max_fdset; 314 int ret, max_fds;
315 unsigned int size; 315 unsigned int size;
316 struct fdtable *fdt; 316 struct fdtable *fdt;
317 /* Allocate small arguments on the stack to save memory and be faster */ 317 /* Allocate small arguments on the stack to save memory and be faster */
@@ -321,13 +321,13 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
321 if (n < 0) 321 if (n < 0)
322 goto out_nofds; 322 goto out_nofds;
323 323
324 /* max_fdset can increase, so grab it once to avoid race */ 324 /* max_fds can increase, so grab it once to avoid race */
325 rcu_read_lock(); 325 rcu_read_lock();
326 fdt = files_fdtable(current->files); 326 fdt = files_fdtable(current->files);
327 max_fdset = fdt->max_fdset; 327 max_fds = fdt->max_fds;
328 rcu_read_unlock(); 328 rcu_read_unlock();
329 if (n > max_fdset) 329 if (n > max_fds)
330 n = max_fdset; 330 n = max_fds;
331 331
332 /* 332 /*
333 * We need 6 bitmaps (in/out/ex for both incoming and outgoing), 333 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),