MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cache_can_fplookup

Function cache_can_fplookup

freebsd/kern/vfs_cache.c:4013–4045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4011}
4012
4013static bool
4014cache_can_fplookup(struct cache_fpl *fpl)
4015{
4016 struct nameidata *ndp;
4017 struct componentname *cnp;
4018 struct thread *td;
4019
4020 ndp = fpl->ndp;
4021 cnp = fpl->cnp;
4022 td = cnp->cn_thread;
4023
4024 if (!atomic_load_char(&cache_fast_lookup_enabled)) {
4025 cache_fpl_aborted_early(fpl);
4026 return (false);
4027 }
4028 if ((cnp->cn_flags & ~CACHE_FPL_SUPPORTED_CN_FLAGS) != 0) {
4029 cache_fpl_aborted_early(fpl);
4030 return (false);
4031 }
4032 if (IN_CAPABILITY_MODE(td)) {
4033 cache_fpl_aborted_early(fpl);
4034 return (false);
4035 }
4036 if (AUDITING_TD(td)) {
4037 cache_fpl_aborted_early(fpl);
4038 return (false);
4039 }
4040 if (ndp->ni_startdir != NULL) {
4041 cache_fpl_aborted_early(fpl);
4042 return (false);
4043 }
4044 return (true);
4045}
4046
4047static int
4048cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp)

Callers 1

cache_fplookupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected