Index: head/sys/kern/vfs_bio.c =================================================================== --- head/sys/kern/vfs_bio.c +++ head/sys/kern/vfs_bio.c @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include @@ -1342,7 +1342,7 @@ * Sync filesystems for shutdown */ wdog_kern_pat(WD_LASTVAL); - sys_sync(curthread, NULL); + kern_sync(curthread); /* * With soft updates, some buffers that are @@ -1369,7 +1369,7 @@ pbusy = nbusy; wdog_kern_pat(WD_LASTVAL); - sys_sync(curthread, NULL); + kern_sync(curthread); #ifdef PREEMPTION /* Index: head/sys/kern/vfs_syscalls.c =================================================================== --- head/sys/kern/vfs_syscalls.c +++ head/sys/kern/vfs_syscalls.c @@ -114,17 +114,8 @@ static int kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, enum uio_seg segflag); -/* - * Sync each mounted filesystem. - */ -#ifndef _SYS_SYSPROTO_H_ -struct sync_args { - int dummy; -}; -#endif -/* ARGSUSED */ int -sys_sync(struct thread *td, struct sync_args *uap) +kern_sync(struct thread *td) { struct mount *mp, *nmp; int save; @@ -149,6 +140,22 @@ } mtx_unlock(&mountlist_mtx); return (0); +} + +/* + * Sync each mounted filesystem. + */ +#ifndef _SYS_SYSPROTO_H_ +struct sync_args { + int dummy; +}; +#endif +/* ARGSUSED */ +int +sys_sync(struct thread *td, struct sync_args *uap) +{ + + return (kern_sync(td)); } /* Index: head/sys/sys/syscallsubr.h =================================================================== --- head/sys/sys/syscallsubr.h +++ head/sys/sys/syscallsubr.h @@ -276,6 +276,7 @@ struct statfs *buf); int kern_symlinkat(struct thread *td, const char *path1, int fd, const char *path2, enum uio_seg segflg); +int kern_sync(struct thread *td); int kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, int *timerid, int preset_id); int kern_ktimer_delete(struct thread *, int);