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()
203 fdt->max_fds = nr; in alloc_fdtable()
256 BUG_ON(nr < cur_fdt->max_fds); in expand_fdtable()
284 if (nr < fdt->max_fds) in expand_files()
351 unsigned int last = find_last_bit(fdt->open_fds, fdt->max_fds); in sane_fdtable_size()
353 if (last == fdt->max_fds) in sane_fdtable_size()
386 new_fdt->max_fds = NR_OPEN_DEFAULT; in dup_fd()
399 while (unlikely(open_files > new_fdt->max_fds)) { in dup_fd()
452 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd()
472 if (i >= fdt->max_fds) in close_files()
519 .max_fds = NR_OPEN_DEFAULT,
531 unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */ in find_next_fd()
569 if (likely(fd < fdt->max_fds)) in alloc_fd()
580 if (unlikely(fd >= fdt->max_fds)) { in alloc_fd()
684 if (fd >= fdt->max_fds) in file_close_fd_locked()
687 fd = array_index_nospec(fd, fdt->max_fds); in file_close_fd_locked()
721 return fdt->max_fds - 1; in last_fd()
858 if (fd >= fdt->max_fds) in do_close_on_exec()
984 nospec_mask = array_index_mask_nospec(fd, fdt->max_fds); in __fget_files_rcu()
1102 for (; fd < files_fdtable(files)->max_fds; fd++) { in fget_task_next()
1280 fd = array_index_nospec(fd, fdt->max_fds); in do_dup2()
1473 for (fdt = files_fdtable(files); n < fdt->max_fds; n++) { in iterate_fd()