Index: sys/sys/mount.h =================================================================== --- sys/sys/mount.h (wersja 211283) +++ sys/sys/mount.h (kopia robocza) @@ -730,7 +730,7 @@ int vfs_busy(struct mount *, int); int vfs_export /* process mount export info */ (struct mount *, struct export_args *); -int vfs_allocate_syncvnode(struct mount *); +void vfs_allocate_syncvnode(struct mount *); int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions); void vfs_getnewfsid(struct mount *); struct cdev *vfs_getrootfsid(struct mount *); Index: sys/kern/vfs_subr.c =================================================================== --- sys/kern/vfs_subr.c (wersja 211283) +++ sys/kern/vfs_subr.c (kopia robocza) @@ -3365,7 +3365,7 @@ /* * Create a new filesystem syncer vnode for the specified mount point. */ -int +void vfs_allocate_syncvnode(struct mount *mp) { struct vnode *vp; @@ -3374,16 +3374,15 @@ int error; /* Allocate a new vnode */ - if ((error = getnewvnode("syncer", mp, &sync_vnodeops, &vp)) != 0) { - mp->mnt_syncer = NULL; - return (error); - } + error = getnewvnode("syncer", mp, &sync_vnodeops, &vp); + if (error != 0) + panic("vfs_allocate_syncvnode: getnewvnode() failed"); vp->v_type = VNON; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vp->v_vflag |= VV_FORCEINSMQ; error = insmntque(vp, mp); if (error != 0) - panic("vfs_allocate_syncvnode: insmntque failed"); + panic("vfs_allocate_syncvnode: insmntque() failed"); vp->v_vflag &= ~VV_FORCEINSMQ; VOP_UNLOCK(vp, 0); /* @@ -3411,7 +3410,6 @@ mtx_unlock(&sync_mtx); BO_UNLOCK(bo); mp->mnt_syncer = vp; - return (0); } /* Index: sys/kern/vfs_mount.c =================================================================== --- sys/kern/vfs_mount.c (wersja 211900) +++ sys/kern/vfs_mount.c (kopia robocza) @@ -1036,7 +1036,7 @@ MNT_IUNLOCK(mp); if ((mp->mnt_flag & MNT_RDONLY) == 0) { if (mp->mnt_syncer == NULL) - error = vfs_allocate_syncvnode(mp); + vfs_allocate_syncvnode(mp); } else { if (mp->mnt_syncer != NULL) vrele(mp->mnt_syncer); @@ -1078,10 +1078,8 @@ mountcheckdirs(vp, newdp); vrele(newdp); if ((mp->mnt_flag & MNT_RDONLY) == 0) - error = vfs_allocate_syncvnode(mp); + vfs_allocate_syncvnode(mp); vfs_unbusy(mp); - if (error) - vrele(vp); } else { vfs_unbusy(mp); vfs_mount_destroy(mp); @@ -1311,7 +1309,7 @@ mp->mnt_kern_flag &= ~MNTK_NOINSMNTQ; if ((mp->mnt_flag & MNT_RDONLY) == 0 && mp->mnt_syncer == NULL) { MNT_IUNLOCK(mp); - (void) vfs_allocate_syncvnode(mp); + vfs_allocate_syncvnode(mp); MNT_ILOCK(mp); } mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_UNMOUNTF);