Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fdescfs/fdesc_vnops.c
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | struct fdesc_get_ino_args { | ||||
struct thread *td; | struct thread *td; | ||||
}; | }; | ||||
static int | static int | ||||
fdesc_get_ino_alloc(struct mount *mp, void *arg, int lkflags, | fdesc_get_ino_alloc(struct mount *mp, void *arg, int lkflags, | ||||
struct vnode **rvp) | struct vnode **rvp) | ||||
{ | { | ||||
struct fdesc_get_ino_args *a; | struct fdesc_get_ino_args *a; | ||||
struct fdescmount *fdm; | |||||
struct vnode *vp; | |||||
int error; | int error; | ||||
a = arg; | a = arg; | ||||
fdm = VFSTOFDESC(mp); | |||||
if ((fdm->flags & FMNT_NODUP) != 0 && a->fp->f_type == DTYPE_VNODE) { | |||||
vp = a->fp->f_vnode; | |||||
vget(vp, lkflags | LK_RETRY); | |||||
*rvp = vp; | |||||
error = 0; | |||||
} else { | |||||
error = fdesc_allocvp(a->ftype, a->fd_fd, a->ix, mp, rvp); | error = fdesc_allocvp(a->ftype, a->fd_fd, a->ix, mp, rvp); | ||||
} | |||||
fdrop(a->fp, a->td); | fdrop(a->fp, a->td); | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* vp is the current namei directory | * vp is the current namei directory | ||||
* ndp is the name to locate in that directory... | * ndp is the name to locate in that directory... | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |