Lines Matching refs:max_fds
118 #define fdt_words(fdt) ((fdt)->max_fds / BITS_PER_LONG) // words in ->open_fds
145 BUG_ON(nfdt->max_fds < ofdt->max_fds); in copy_fdtable()
147 cpy = ofdt->max_fds * sizeof(struct file *); in copy_fdtable()
148 set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); in copy_fdtable()
218 fdt->max_fds = nr; in alloc_fdtable()
271 BUG_ON(nr < cur_fdt->max_fds); in expand_fdtable()
299 if (nr < fdt->max_fds) in expand_files()
366 unsigned int last = find_last_bit(fdt->open_fds, fdt->max_fds); in sane_fdtable_size()
368 if (last == fdt->max_fds) in sane_fdtable_size()
401 new_fdt->max_fds = NR_OPEN_DEFAULT; in dup_fd()
414 while (unlikely(open_files > new_fdt->max_fds)) { in dup_fd()
467 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd()
487 if (i >= fdt->max_fds) in close_files()
534 .max_fds = NR_OPEN_DEFAULT,
546 unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */ in find_next_fd()
584 if (likely(fd < fdt->max_fds)) in alloc_fd()
595 if (unlikely(fd >= fdt->max_fds)) { in alloc_fd()
699 if (fd >= fdt->max_fds) in file_close_fd_locked()
702 fd = array_index_nospec(fd, fdt->max_fds); in file_close_fd_locked()
736 return fdt->max_fds - 1; in last_fd()
873 if (fd >= fdt->max_fds) in do_close_on_exec()
999 nospec_mask = array_index_mask_nospec(fd, fdt->max_fds); in __fget_files_rcu()
1117 for (; fd < files_fdtable(files)->max_fds; fd++) { in fget_task_next()
1299 fd = array_index_nospec(fd, fdt->max_fds); in do_dup2()
1492 for (fdt = files_fdtable(files); n < fdt->max_fds; n++) { in iterate_fd()