Lines Matching defs:fdt
43 static inline void free_fdarr(struct fdtable *fdt)
45 if (fdt->max_fds <= (PAGE_SIZE / sizeof(struct file *)))
46 kfree(fdt->fd);
48 vfree(fdt->fd);
51 static inline void free_fdset(struct fdtable *fdt)
53 if (fdt->max_fds <= (PAGE_SIZE * BITS_PER_BYTE / 2))
54 kfree(fdt->open_fds);
56 vfree(fdt->open_fds);
63 struct fdtable *fdt;
66 fdt = f->next;
69 while(fdt) {
70 struct fdtable *next = fdt->next;
71 vfree(fdt->fd);
72 free_fdset(fdt);
73 kfree(fdt);
74 fdt = next;
80 struct fdtable *fdt = container_of(rcu, struct fdtable, rcu);
83 BUG_ON(!fdt);
85 if (fdt->max_fds <= NR_OPEN_DEFAULT) {
91 container_of(fdt, struct files_struct, fdtab));
94 if (fdt->max_fds <= (PAGE_SIZE / sizeof(struct file *))) {
95 kfree(fdt->fd);
96 kfree(fdt->open_fds);
97 kfree(fdt);
101 fdt->next = fddef->next;
102 fddef->next = fdt;
137 struct fdtable *fdt;
153 fdt = kmalloc(sizeof(struct fdtable), GFP_KERNEL);
154 if (!fdt)
156 fdt->max_fds = nr;
160 fdt->fd = (struct file **)data;
165 fdt->open_fds = (fd_set *)data;
167 fdt->close_on_exec = (fd_set *)data;
168 INIT_RCU_HEAD(&fdt->rcu);
169 fdt->next = NULL;
171 return fdt;
174 free_fdarr(fdt);
176 kfree(fdt);
207 rcu_assign_pointer(files->fdt, new_fdt);
229 struct fdtable *fdt;
231 fdt = files_fdtable(files);
233 if (nr < fdt->max_fds)