Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_node.c
Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | fuse_vnode_get(struct mount *mp, | ||||
struct thread *td = curthread; | struct thread *td = curthread; | ||||
/* | /* | ||||
* feo should only be NULL for the root directory, which (when libfuse | * feo should only be NULL for the root directory, which (when libfuse | ||||
* is used) always has generation 0 | * is used) always has generation 0 | ||||
*/ | */ | ||||
uint64_t generation = feo ? feo->generation : 0; | uint64_t generation = feo ? feo->generation : 0; | ||||
int err = 0; | int err = 0; | ||||
if (dvp != NULL && VTOFUD(dvp)->nid == nodeid) { | |||||
fuse_warn(fuse_get_mpdata(mp), FSESS_WARN_ILLEGAL_INODE, | |||||
"Assigned same inode to both parent and child."); | |||||
return EIO; | |||||
} | |||||
err = fuse_vnode_alloc(mp, td, nodeid, vtyp, vpp); | err = fuse_vnode_alloc(mp, td, nodeid, vtyp, vpp); | ||||
if (err) { | if (err) { | ||||
return err; | return err; | ||||
} | } | ||||
if (dvp != NULL) { | if (dvp != NULL) { | ||||
MPASS(cnp && (cnp->cn_flags & ISDOTDOT) == 0); | MPASS(cnp && (cnp->cn_flags & ISDOTDOT) == 0); | ||||
MPASS(cnp && | MPASS(cnp && | ||||
!(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')); | !(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')); | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |