fdnode
struct fdnode *new_fd_files;
malloc(fd_nfiles * sizeof(struct fdnode));
n = fdp.fd_nfiles * sizeof(struct fdnode);
struct fdnode *fd_files;
fd_files = malloc(fd_nfiles * sizeof(struct fdnode));
struct fdnode *newfiles;
struct fdnode *oldfiles;
newfiles = kmalloc(nf * sizeof(struct fdnode), M_FILEDESC, M_WAITOK);
bcopy(fdp->fd_files, newfiles, fdp->fd_nfiles * sizeof(struct fdnode));
bzero(&newfiles[fdp->fd_nfiles], extra * sizeof(struct fdnode));
fclearcache(struct fdnode *fdn, struct fdcache *match_fdc, int status)
struct fdnode *fdnode;
fdnode = &fdp->fd_files[fdp->fd_freefile];
for (i = last - fdp->fd_freefile; --i >= 0; ++fdnode) {
if (fdnode->fp == NULL && --n <= 0) {
struct fdnode *fdnode;
newfdp->fd_files = kmalloc(i * sizeof(struct fdnode),
bcopy(fdp->fd_files, newfdp->fd_files, i * sizeof(struct fdnode));
fdnode = &newfdp->fd_files[i];
if (fdnode->reserved) {
fdnode->reserved = 0;
} else if (fdnode->fp) {
bzero(&fdnode->tdcache, sizeof(fdnode->tdcache));
if (fdnode->fp->f_type == DTYPE_KQUEUE ||
(fdnode->fileflags & UF_FOCLOSE) != 0) {
fhold(fdnode->fp);
struct fdnode *fdnode;
fdnode = &fdp->fd_files[i];
if (fdnode->fp == NULL ||
fdnode->fp->f_type != DTYPE_VNODE) {
fp = fdnode->fp;
struct fdnode *fdn;
struct fdnode *fd_files; /* file structures for open files */
struct fdnode fd_builtin_files[NDFILE];
struct fdnode;
struct tmpfs_node *fdnode;
fdnode = VP_TO_TMPFS_DIR(fdvp);
tmpfs_lock4(fdnode, tdnode, fnode, tnode);
de = tmpfs_dir_lookup(fdnode, fnode, fncp);
(fdnode->tn_flags & (APPEND | IMMUTABLE))) {
if (fdnode != tdnode) {
tmpfs_dir_detach_locked(fdnode, de);
KKASSERT(de == tmpfs_dir_lookup(fdnode, fnode, fncp));
RB_REMOVE(tmpfs_dirtree, &fdnode->tn_dir.tn_dirtree, de);
&fdnode->tn_dir.tn_cookietree, de);
if (fdnode != tdnode) {
tmpfs_unlock4(fdnode, tdnode, fnode, tnode);
tmpfs_unlock4(fdnode, tdnode, fnode, tnode);
struct fdnode *ofiles; /* buffer of pointers to file structures */
ofiles = malloc((d) * sizeof(struct fdnode)); \
(filed.fd_lastfile+1) * sizeof(struct fdnode))) {