Lines Matching refs:nnode

545 	struct tmpfs_node *nnode;  in tmpfs_alloc_node()  local
581 nnode = uma_zalloc_smr(tmpfs_node_pool, M_WAITOK); in tmpfs_alloc_node()
584 nnode->tn_type = type; in tmpfs_alloc_node()
585 vfs_timestamp(&nnode->tn_atime); in tmpfs_alloc_node()
586 nnode->tn_birthtime = nnode->tn_ctime = nnode->tn_mtime = in tmpfs_alloc_node()
587 nnode->tn_atime; in tmpfs_alloc_node()
588 nnode->tn_uid = uid; in tmpfs_alloc_node()
589 nnode->tn_gid = gid; in tmpfs_alloc_node()
590 nnode->tn_mode = mode; in tmpfs_alloc_node()
591 nnode->tn_id = alloc_unr64(&tmp->tm_ino_unr); in tmpfs_alloc_node()
592 nnode->tn_refcount = 1; in tmpfs_alloc_node()
593 LIST_INIT(&nnode->tn_extattrs); in tmpfs_alloc_node()
596 switch (nnode->tn_type) { in tmpfs_alloc_node()
599 nnode->tn_rdev = rdev; in tmpfs_alloc_node()
603 RB_INIT(&nnode->tn_dir.tn_dirhead); in tmpfs_alloc_node()
604 LIST_INIT(&nnode->tn_dir.tn_dupindex); in tmpfs_alloc_node()
605 MPASS(parent != nnode); in tmpfs_alloc_node()
607 nnode->tn_dir.tn_parent = (parent == NULL) ? nnode : parent; in tmpfs_alloc_node()
608 nnode->tn_dir.tn_readdir_lastn = 0; in tmpfs_alloc_node()
609 nnode->tn_dir.tn_readdir_lastp = NULL; in tmpfs_alloc_node()
610 nnode->tn_dir.tn_wht_size = 0; in tmpfs_alloc_node()
611 nnode->tn_links++; in tmpfs_alloc_node()
612 TMPFS_NODE_LOCK(nnode->tn_dir.tn_parent); in tmpfs_alloc_node()
613 nnode->tn_dir.tn_parent->tn_links++; in tmpfs_alloc_node()
614 TMPFS_NODE_UNLOCK(nnode->tn_dir.tn_parent); in tmpfs_alloc_node()
624 nnode->tn_size = strlen(target); in tmpfs_alloc_node()
628 symlink = cache_symlink_alloc(nnode->tn_size + 1, in tmpfs_alloc_node()
633 symlink = malloc(nnode->tn_size + 1, M_TMPFSNAME, in tmpfs_alloc_node()
637 memcpy(symlink, target, nnode->tn_size + 1); in tmpfs_alloc_node()
656 atomic_store_ptr(&nnode->tn_link_target, symlink); in tmpfs_alloc_node()
657 atomic_store_char((char *)&nnode->tn_link_smr, symlink_smr); in tmpfs_alloc_node()
662 nnode->tn_reg.tn_aobj = in tmpfs_alloc_node()
666 nnode->tn_reg.tn_aobj->un_pager.swp.swp_priv = nnode; in tmpfs_alloc_node()
667 vm_object_set_flag(nnode->tn_reg.tn_aobj, OBJ_TMPFS); in tmpfs_alloc_node()
668 nnode->tn_reg.tn_tmp = tmp; in tmpfs_alloc_node()
669 nnode->tn_reg.tn_pages = 0; in tmpfs_alloc_node()
673 panic("tmpfs_alloc_node: type %p %d", nnode, in tmpfs_alloc_node()
674 (int)nnode->tn_type); in tmpfs_alloc_node()
678 LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries); in tmpfs_alloc_node()
679 nnode->tn_attached = true; in tmpfs_alloc_node()
684 *node = nnode; in tmpfs_alloc_node()