Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_lockf.c
| Show First 20 Lines • Show All 2,516 Lines • ▼ Show 20 Lines | vfs_report_lockf(struct mount *mp, struct sbuf *sb) | ||||
| gerror = 0; | gerror = 0; | ||||
| ucred = curthread->td_ucred; | ucred = curthread->td_ucred; | ||||
| while ((klf = STAILQ_FIRST(&locks)) != NULL) { | while ((klf = STAILQ_FIRST(&locks)) != NULL) { | ||||
| STAILQ_REMOVE_HEAD(&locks, link); | STAILQ_REMOVE_HEAD(&locks, link); | ||||
| vp = klf->vp; | vp = klf->vp; | ||||
| if (gerror == 0 && vn_lock(vp, LK_SHARED) == 0) { | if (gerror == 0 && vn_lock(vp, LK_SHARED) == 0) { | ||||
| error = prison_canseemount(ucred, vp->v_mount); | error = prison_canseemount(ucred, vp->v_mount); | ||||
| if (error == 0) | if (error == 0) | ||||
| error = VOP_STAT(vp, &stt, ucred, NOCRED); | error = VOP_STAT(vp, &stt, 0, ucred, NOCRED); | ||||
| VOP_UNLOCK(vp); | VOP_UNLOCK(vp); | ||||
| if (error == 0) { | if (error == 0) { | ||||
| klf->kl.kl_file_fsid = stt.st_dev; | klf->kl.kl_file_fsid = stt.st_dev; | ||||
| klf->kl.kl_file_rdev = stt.st_rdev; | klf->kl.kl_file_rdev = stt.st_rdev; | ||||
| klf->kl.kl_file_fileid = stt.st_ino; | klf->kl.kl_file_fileid = stt.st_ino; | ||||
| freepath = NULL; | freepath = NULL; | ||||
| fullpath = "-"; | fullpath = "-"; | ||||
| error = vn_fullpath(vp, &fullpath, &freepath); | error = vn_fullpath(vp, &fullpath, &freepath); | ||||
| ▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines | |||||