diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index f5ab24a19e..52ca674435 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1515,11 +1515,12 @@ getfsstat_callback(struct mount *mp, void *data) char *fullpath; int error; + if (info->td->td_proc && + !chroot_visible_mnt(mp, info->td->td_proc)) { + return(0); + } + if (info->sfsp && info->count < info->maxcount) { - if (info->td->td_proc && - !chroot_visible_mnt(mp, info->td->td_proc)) { - return(0); - } sp = &mp->mnt_stat; /*