Lines Matching refs:max_fds
49 #define fdt_words(fdt) ((fdt)->max_fds / BITS_PER_LONG) // words in ->open_fds
76 BUG_ON(nfdt->max_fds < ofdt->max_fds); in copy_fdtable()
78 cpy = ofdt->max_fds * sizeof(struct file *); in copy_fdtable()
79 set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); in copy_fdtable()
131 fdt->max_fds = nr; in alloc_fdtable()
187 if (unlikely(new_fdt->max_fds <= nr)) { in expand_fdtable()
192 BUG_ON(nr < cur_fdt->max_fds); in expand_fdtable()
221 if (nr < fdt->max_fds) in expand_files()
286 unsigned int last = find_last_bit(fdt->open_fds, fdt->max_fds); in sane_fdtable_size()
288 if (last == fdt->max_fds) in sane_fdtable_size()
322 new_fdt->max_fds = NR_OPEN_DEFAULT; in dup_fd()
335 while (unlikely(open_files > new_fdt->max_fds)) { in dup_fd()
348 if (unlikely(new_fdt->max_fds < open_files)) { in dup_fd()
387 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd()
411 if (i >= fdt->max_fds) in close_files()
458 .max_fds = NR_OPEN_DEFAULT,
470 unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */ in find_next_fd()
499 if (fd < fdt->max_fds) in alloc_fd()
635 if (fd >= fdt->max_fds) in file_close_fd_locked()
638 fd = array_index_nospec(fd, fdt->max_fds); in file_close_fd_locked()
672 return fdt->max_fds - 1; in last_fd()
807 if (fd >= fdt->max_fds) in do_close_on_exec()
933 nospec_mask = array_index_mask_nospec(fd, fdt->max_fds); in __fget_files_rcu()
1072 for (; fd < files_fdtable(files)->max_fds; fd++) { in task_lookup_next_fdget_rcu()
1220 fd = array_index_nospec(fd, fdt->max_fds); in do_dup2()
1417 for (fdt = files_fdtable(files); n < fdt->max_fds; n++) { in iterate_fd()