Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_stats.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_RESOLVE_BENEATH | | ||||
AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); | ||||
if ((error = namei(&nd)) != 0) { | if ((error = namei(&nd)) != 0) { | ||||
if (error == ENOTDIR && | if (error == ENOTDIR && | ||||
(nd.ni_resflags & NIRES_EMPTYPATH) != 0) | (nd.ni_resflags & NIRES_EMPTYPATH) != 0) | ||||
error = linux_kern_fstat(td, fd, sbp); | error = linux_kern_fstat(td, fd, sbp); | ||||
return (error); | return (error); | ||||
} | } | ||||
error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); | error = VOP_STAT(nd.ni_vp, sbp, 0, td->td_ucred, NOCRED); | ||||
if (error == 0) | if (error == 0) | ||||
translate_vnhook_major_minor(nd.ni_vp, sbp); | translate_vnhook_major_minor(nd.ni_vp, sbp); | ||||
NDFREE_PNBUF(&nd); | NDFREE_PNBUF(&nd); | ||||
vput(nd.ni_vp); | vput(nd.ni_vp); | ||||
#ifdef KTRACE | #ifdef KTRACE | ||||
if (KTRPOINT(td, KTR_STRUCT)) | if (KTRPOINT(td, KTR_STRUCT)) | ||||
ktrstat_error(sbp, error); | ktrstat_error(sbp, error); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 596 Lines • Show Last 20 Lines |