Lines Matching defs:dnode
119 tmpfs_node_t *dnode, *tnode;
126 dnode = VP_TO_TMPFS_DIR(dvp);
172 KASSERT(dnode->tn_type == VDIR);
173 pnode = dnode->tn_spec.tn_dir.tn_parent;
211 de = tmpfs_dir_lookup(dnode, cnp);
259 if ((dnode->tn_mode & S_ISTXT) != 0) {
261 cred->cr_uid != dnode->tn_uid &&
691 tmpfs_node_t *dnode, *node;
702 dnode = VP_TO_TMPFS_NODE(dvp);
715 if (dnode->tn_flags & APPEND) {
723 de = tmpfs_dir_lookup(dnode, cnp);
734 tmpfs_dir_detach(dnode, de);
760 tmpfs_node_t *dnode, *node;
767 dnode = VP_TO_TMPFS_DIR(dvp);
785 if (TMPFS_DIRSEQ_FULL(dnode)) {
801 tmpfs_dir_attach(dnode, de, node);
849 tmpfs_node_t *dnode = VP_TO_TMPFS_DIR(dvp);
864 KASSERT(node->tn_spec.tn_dir.tn_parent == dnode);
883 de = tmpfs_dir_lookup(dnode, cnp);
888 if (dnode->tn_flags & APPEND || node->tn_flags & (IMMUTABLE | APPEND)) {
898 tmpfs_dir_detach(dnode, de);
1663 struct vnode *dvp, struct tmpfs_node *dnode,
1673 error = tmpfs_rename_lock_directory(dvp, dnode);
1694 fde = tmpfs_dir_lookup(dnode, fcnp);
1702 KASSERT(fde->td_node != dnode);
1704 KASSERT(fde->td_node != dnode->tn_spec.tn_dir.tn_parent);
1720 tde = tmpfs_dir_lookup(dnode, tcnp);
1726 KASSERT(tde->td_node != dnode);
1728 KASSERT(tde->td_node != dnode->tn_spec.tn_dir.tn_parent);
2246 struct tmpfs_node *dnode, struct tmpfs_dirent *de, struct vnode *vp,
2253 KASSERT(dnode != NULL);
2256 KASSERT(dnode->tn_vnode == dvp);
2262 error = tmpfs_remove_check_possible(dnode, de->td_node);
2266 error = tmpfs_remove_check_permitted(cred, dnode, de->td_node);
2274 if ((dnode->tn_mode & S_ISTXT) != 0)
2275 if (cred->cr_uid != 0 && cred->cr_uid != dnode->tn_uid &&
2279 tmpfs_dir_detach(dnode, de);
2410 * Check whether removing node's entry in dnode is possible independent
2416 tmpfs_remove_check_possible(struct tmpfs_node *dnode, struct tmpfs_node *node)
2419 KASSERT(dnode != NULL);
2420 KASSERT(dnode->tn_vnode != NULL);
2422 KASSERT(dnode != node);
2423 KASSERT(VOP_ISLOCKED(dnode->tn_vnode) == LK_EXCLUSIVE);
2427 * We want to delete the entry. If dnode is immutable, we
2428 * can't write to it to delete the entry. If dnode is
2434 if ((dnode->tn_flags | node->tn_flags) & (IMMUTABLE | APPEND))
2441 * Check whether removing node's entry in dnode is permitted given our
2448 struct tmpfs_node *dnode, struct tmpfs_node *node)
2452 KASSERT(dnode != NULL);
2453 KASSERT(dnode->tn_vnode != NULL);
2455 KASSERT(dnode != node);
2456 KASSERT(VOP_ISLOCKED(dnode->tn_vnode) == LK_EXCLUSIVE);
2463 error = VOP_ACCESS(dnode->tn_vnode, VWRITE, cred, curproc);
2467 error = tmpfs_check_sticky(cred, dnode, node);
2483 struct tmpfs_node *dnode, struct tmpfs_node *node)
2486 KASSERT(dnode != NULL);
2487 KASSERT(dnode->tn_vnode != NULL);
2488 KASSERT(VOP_ISLOCKED(dnode->tn_vnode) == LK_EXCLUSIVE);
2491 (VOP_ISLOCKED(dnode->tn_vnode) == LK_EXCLUSIVE));
2496 if (dnode->tn_mode & S_ISTXT) {
2498 cred->cr_uid != dnode->tn_uid &&