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

Function pwd_hold

freebsd/kern/kern_descrip.c:3846–3866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3844}
3845
3846struct pwd *
3847pwd_hold(struct thread *td)
3848{
3849 struct pwddesc *pdp;
3850 struct pwd *pwd;
3851
3852 pdp = td->td_proc->p_pd;
3853
3854 vfs_smr_enter();
3855 pwd = vfs_smr_entered_load(&pdp->pd_pwd);
3856 if (pwd_hold_smr(pwd)) {
3857 vfs_smr_exit();
3858 return (pwd);
3859 }
3860 vfs_smr_exit();
3861 PWDDESC_XLOCK(pdp);
3862 pwd = pwd_hold_pwddesc(pdp);
3863 MPASS(pwd != NULL);
3864 PWDDESC_XUNLOCK(pdp);
3865 return (pwd);
3866}
3867
3868static struct pwd *
3869pwd_alloc(void)

Callers 6

audit_canon_pathFunction · 0.85
vn_getcwdFunction · 0.85
vn_fullpathFunction · 0.85
vn_fullpath_hardlinkFunction · 0.85
linker_root_mountedFunction · 0.85
namei_setupFunction · 0.85

Calls 2

pwd_hold_smrFunction · 0.85
pwd_hold_pwddescFunction · 0.85

Tested by

no test coverage detected