Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_syscalls.c
Show First 20 Lines • Show All 489 Lines • ▼ Show 20 Lines | if (sfsp && count < maxcount) { | ||||
* Set these in case the underlying filesystem | * Set these in case the underlying filesystem | ||||
* fails to do so. | * fails to do so. | ||||
*/ | */ | ||||
sp->f_version = STATFS_VERSION; | sp->f_version = STATFS_VERSION; | ||||
sp->f_namemax = NAME_MAX; | sp->f_namemax = NAME_MAX; | ||||
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; | sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; | ||||
/* | /* | ||||
* If MNT_NOWAIT or MNT_LAZY is specified, do not | * If MNT_NOWAIT or MNT_LAZY is specified, do not | ||||
* refresh the fsstat cache. MNT_NOWAIT or MNT_LAZY | * refresh the fsstat cache. | ||||
* overrides MNT_WAIT. | |||||
*/ | */ | ||||
if (((flags & (MNT_LAZY|MNT_NOWAIT)) == 0 || | if (flags != MNT_LAZY && flags != MNT_NOWAIT) { | ||||
(flags & MNT_WAIT)) && | error = VFS_STATFS(mp, sp); | ||||
(error = VFS_STATFS(mp, sp))) { | if (error != 0) { | ||||
mtx_lock(&mountlist_mtx); | mtx_lock(&mountlist_mtx); | ||||
nmp = TAILQ_NEXT(mp, mnt_list); | nmp = TAILQ_NEXT(mp, mnt_list); | ||||
vfs_unbusy(mp); | vfs_unbusy(mp); | ||||
continue; | continue; | ||||
} | |||||
} | } | ||||
if (priv_check(td, PRIV_VFS_GENERATION)) { | if (priv_check(td, PRIV_VFS_GENERATION)) { | ||||
bcopy(sp, &sb, sizeof(sb)); | bcopy(sp, &sb, sizeof(sb)); | ||||
sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; | sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; | ||||
prison_enforce_statfs(td->td_ucred, mp, &sb); | prison_enforce_statfs(td->td_ucred, mp, &sb); | ||||
sp = &sb; | sp = &sb; | ||||
} | } | ||||
if (bufseg == UIO_SYSSPACE) | if (bufseg == UIO_SYSSPACE) | ||||
▲ Show 20 Lines • Show All 4,165 Lines • Show Last 20 Lines |