Lines Matching refs:fd
114 static int fdesc_attr(int fd, struct vnode_attr *vap, vfs_context_t a_context);
206 struct fdescnode *fd; in fdesc_allocvp() local
216 for (fd = fc->lh_first; fd != 0; fd = fd->fd_hash.le_next) { in fdesc_allocvp()
217 if (fd->fd_ix == ix && vnode_mount(fd->fd_vnode) == mp) { in fdesc_allocvp()
218 vid = vnode_vid(fd->fd_vnode); in fdesc_allocvp()
219 vp = fd->fd_vnode; in fdesc_allocvp()
247 fd = kalloc_type(struct fdescnode, Z_WAITOK); in fdesc_allocvp()
253 vfsp.vnfs_fsnode = fd; in fdesc_allocvp()
265 kfree_type(struct fdescnode, fd); in fdesc_allocvp()
271 fd->fd_vnode = *vpp; in fdesc_allocvp()
272 fd->fd_type = ftype; in fdesc_allocvp()
273 fd->fd_fd = fdno; in fdesc_allocvp()
274 fd->fd_link = NULL; in fdesc_allocvp()
275 fd->fd_ix = ix; in fdesc_allocvp()
279 LIST_INSERT_HEAD(fc, fd, fd_hash); in fdesc_allocvp()
309 int fd; in devfs_devfd_lookup() local
322 fd = 0; in devfs_devfd_lookup()
324 if (os_mul_and_add_overflow(fd, 10, *pname++ - '0', &fd)) { in devfs_devfd_lookup()
334 if (fd < 0 || fd >= numfiles || in devfs_devfd_lookup()
335 *fdfile(p, fd) == NULL || in devfs_devfd_lookup()
336 (*fdflags(p, fd) & UF_RESERVED)) { in devfs_devfd_lookup()
349 (0 == vnode_getfromfd(ap->a_context, fd, &fvp))) { in devfs_devfd_lookup()
355 error = fdesc_allocvp(Fdesc, FD_DESC + fd, dvp->v_mount, &fvp, VNON, fd); in devfs_devfd_lookup()
403 fdesc_attr(int fd, struct vnode_attr *vap, vfs_context_t a_context) in fdesc_attr() argument
410 if ((error = fp_lookup(p, fd, &fp, 0))) { in fdesc_attr()
474 fp_drop(p, fd, fp, 0); in fdesc_attr()
483 unsigned fd; in fdesc_getattr() local
488 fd = VTOFDESC(vp)->fd_fd; in fdesc_getattr()
489 error = fdesc_attr(fd, vap, ap->a_context); in fdesc_getattr()
515 unsigned fd; in fdesc_setattr() local
530 fd = VTOFDESC(ap->a_vp)->fd_fd; in fdesc_setattr()
531 if ((error = fp_lookup(vfs_context_proc(ap->a_context), fd, &fp, 0))) { in fdesc_setattr()
555 fp_drop(p, fd, fp, 0); in fdesc_setattr()
675 struct fdescnode *fd = VTOFDESC(vp); in fdesc_reclaim() local
679 LIST_REMOVE(fd, fd_hash); in fdesc_reclaim()