Lines Matching refs:new_fdt

146 	struct fdtable *new_fdt, *cur_fdt;  in expand_fdtable()  local
149 new_fdt = alloc_fdtable(nr); in expand_fdtable()
151 if (!new_fdt) in expand_fdtable()
157 if (unlikely(new_fdt->max_fds <= nr)) { in expand_fdtable()
158 __free_fdtable(new_fdt); in expand_fdtable()
168 copy_fdtable(new_fdt, cur_fdt); in expand_fdtable()
169 rcu_assign_pointer(files->fdt, new_fdt); in expand_fdtable()
174 __free_fdtable(new_fdt); in expand_fdtable()
249 struct fdtable *old_fdt, *new_fdt; in dup_fd() local
260 new_fdt = &newf->fdtab; in dup_fd()
261 new_fdt->max_fds = NR_OPEN_DEFAULT; in dup_fd()
262 new_fdt->close_on_exec = newf->close_on_exec_init; in dup_fd()
263 new_fdt->open_fds = newf->open_fds_init; in dup_fd()
264 new_fdt->fd = &newf->fd_array[0]; in dup_fd()
273 while (unlikely(open_files > new_fdt->max_fds)) { in dup_fd()
276 if (new_fdt != &newf->fdtab) in dup_fd()
277 __free_fdtable(new_fdt); in dup_fd()
279 new_fdt = alloc_fdtable(open_files - 1); in dup_fd()
280 if (!new_fdt) { in dup_fd()
286 if (unlikely(new_fdt->max_fds < open_files)) { in dup_fd()
287 __free_fdtable(new_fdt); in dup_fd()
303 new_fds = new_fdt->fd; in dup_fd()
305 memcpy(new_fdt->open_fds, old_fdt->open_fds, open_files / 8); in dup_fd()
306 memcpy(new_fdt->close_on_exec, old_fdt->close_on_exec, open_files / 8); in dup_fd()
319 __clear_open_fd(open_files - i, new_fdt); in dup_fd()
326 size = (new_fdt->max_fds - open_files) * sizeof(struct file *); in dup_fd()
331 if (new_fdt->max_fds > open_files) { in dup_fd()
332 int left = (new_fdt->max_fds - open_files) / 8; in dup_fd()
335 memset(&new_fdt->open_fds[start], 0, left); in dup_fd()
336 memset(&new_fdt->close_on_exec[start], 0, left); in dup_fd()
339 rcu_assign_pointer(newf->fdt, new_fdt); in dup_fd()