Lines Matching defs:nnode
584 struct tmpfs_node *nnode;
620 nnode = uma_zalloc_smr(tmpfs_node_pool, M_WAITOK);
623 nnode->tn_type = type;
624 vfs_timestamp(&nnode->tn_atime);
625 nnode->tn_birthtime = nnode->tn_ctime = nnode->tn_mtime =
626 nnode->tn_atime;
627 nnode->tn_uid = uid;
628 nnode->tn_gid = gid;
629 nnode->tn_mode = mode;
630 nnode->tn_id = alloc_unr64(&tmp->tm_ino_unr);
631 nnode->tn_refcount = 1;
632 LIST_INIT(&nnode->tn_extattrs);
635 switch (nnode->tn_type) {
638 nnode->tn_rdev = rdev;
642 RB_INIT(&nnode->tn_dir.tn_dirhead);
643 LIST_INIT(&nnode->tn_dir.tn_dupindex);
644 MPASS(parent != nnode);
646 nnode->tn_dir.tn_parent = (parent == NULL) ? nnode : parent;
647 nnode->tn_dir.tn_readdir_lastn = 0;
648 nnode->tn_dir.tn_readdir_lastp = NULL;
649 nnode->tn_dir.tn_wht_size = 0;
650 nnode->tn_links++;
651 TMPFS_NODE_LOCK(nnode->tn_dir.tn_parent);
652 nnode->tn_dir.tn_parent->tn_links++;
653 TMPFS_NODE_UNLOCK(nnode->tn_dir.tn_parent);
663 nnode->tn_size = strlen(target);
667 symlink = cache_symlink_alloc(nnode->tn_size + 1,
672 symlink = malloc(nnode->tn_size + 1, M_TMPFSNAME,
676 memcpy(symlink, target, nnode->tn_size + 1);
682 * 1. nnode is not yet visible to the world
695 atomic_store_ptr(&nnode->tn_link_target, symlink);
696 atomic_store_char((char *)&nnode->tn_link_smr, symlink_smr);
701 nnode->tn_reg.tn_aobj =
705 nnode->tn_reg.tn_aobj->un_pager.swp.swp_priv = nnode;
706 vm_object_set_flag(nnode->tn_reg.tn_aobj, OBJ_TMPFS);
707 nnode->tn_reg.tn_tmp = tmp;
708 nnode->tn_reg.tn_pages = 0;
712 panic("tmpfs_alloc_node: type %p %d", nnode,
713 (int)nnode->tn_type);
717 LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries);
718 nnode->tn_attached = true;
723 *node = nnode;