Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_cache.c
Show First 20 Lines • Show All 4,343 Lines • ▼ Show 20 Lines | cache_fpl_terminated(struct cache_fpl *fpl) | ||||
return (fpl->status != CACHE_FPL_STATUS_UNSET); | return (fpl->status != CACHE_FPL_STATUS_UNSET); | ||||
} | } | ||||
#define CACHE_FPL_SUPPORTED_CN_FLAGS \ | #define CACHE_FPL_SUPPORTED_CN_FLAGS \ | ||||
(NC_NOMAKEENTRY | NC_KEEPPOSENTRY | LOCKLEAF | LOCKPARENT | WANTPARENT | \ | (NC_NOMAKEENTRY | NC_KEEPPOSENTRY | LOCKLEAF | LOCKPARENT | WANTPARENT | \ | ||||
FAILIFEXISTS | FOLLOW | EMPTYPATH | LOCKSHARED | WILLBEDIR | \ | FAILIFEXISTS | FOLLOW | EMPTYPATH | LOCKSHARED | WILLBEDIR | \ | ||||
ISOPEN | NOMACCHECK | AUDITVNODE1 | AUDITVNODE2 | NOCAPCHECK | OPENREAD | \ | ISOPEN | NOMACCHECK | AUDITVNODE1 | AUDITVNODE2 | NOCAPCHECK | OPENREAD | \ | ||||
OPENWRITE | WANTIOCTLCAPS) | OPENWRITE | WANTIOCTLCAPS | ISRESTARTED) | ||||
#define CACHE_FPL_INTERNAL_CN_FLAGS \ | #define CACHE_FPL_INTERNAL_CN_FLAGS \ | ||||
(ISDOTDOT | MAKEENTRY | ISLASTCN) | (ISDOTDOT | MAKEENTRY | ISLASTCN) | ||||
_Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & CACHE_FPL_INTERNAL_CN_FLAGS) == 0, | _Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & CACHE_FPL_INTERNAL_CN_FLAGS) == 0, | ||||
"supported and internal flags overlap"); | "supported and internal flags overlap"); | ||||
static bool | static bool | ||||
▲ Show 20 Lines • Show All 1,872 Lines • ▼ Show 20 Lines | #ifdef INVARIANTS | ||||
fpl.debug.ni_pathlen = ndp->ni_pathlen; | fpl.debug.ni_pathlen = ndp->ni_pathlen; | ||||
#endif | #endif | ||||
fpl.nulchar = &cnp->cn_nameptr[ndp->ni_pathlen - 1]; | fpl.nulchar = &cnp->cn_nameptr[ndp->ni_pathlen - 1]; | ||||
fpl.fsearch = false; | fpl.fsearch = false; | ||||
fpl.tvp = NULL; /* for degenerate path handling */ | fpl.tvp = NULL; /* for degenerate path handling */ | ||||
fpl.pwd = pwdp; | fpl.pwd = pwdp; | ||||
pwd = pwd_get_smr(); | pwd = pwd_get_smr(); | ||||
*(fpl.pwd) = pwd; | *(fpl.pwd) = pwd; | ||||
ndp->ni_rootdir = pwd->pwd_rdir; | namei_setup_rootdir(ndp, cnp, pwd); | ||||
ndp->ni_topdir = pwd->pwd_jdir; | ndp->ni_topdir = pwd->pwd_jdir; | ||||
if (cnp->cn_pnbuf[0] == '/') { | if (cnp->cn_pnbuf[0] == '/') { | ||||
dvp = cache_fpl_handle_root(&fpl); | dvp = cache_fpl_handle_root(&fpl); | ||||
ndp->ni_resflags = NIRES_ABS; | ndp->ni_resflags = NIRES_ABS; | ||||
} else { | } else { | ||||
if (ndp->ni_dirfd == AT_FDCWD) { | if (ndp->ni_dirfd == AT_FDCWD) { | ||||
dvp = pwd->pwd_cdir; | dvp = pwd->pwd_cdir; | ||||
Show All 33 Lines |