The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a30ea6460ac63110312030db5f0a372eeb4507b6
commit a30ea6460ac63110312030db5f0a372eeb4507b6 Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-09-22 16:30:11 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-09-30 21:37:19 +0000 VFS: style (cherry picked from commit e40c72c823c6502906d4024933f0c119b5ca17cf) --- sys/fs/nullfs/null_vfsops.c | 3 ++- sys/kern/vfs_cache.c | 9 ++++++--- sys/kern/vfs_mount.c | 6 ++++-- sys/kern/vfs_subr.c | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index b3fd266c7fe0..6f78ace22bba 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -175,7 +175,8 @@ nullfs_mount(struct mount *mp) * Lower vnode must be the same type as the covered vnode - we * don't allow mounting directories to files or vice versa. */ - if ((lowerrootvp->v_type != VDIR && lowerrootvp->v_type != VREG && lowerrootvp->v_type != VSOCK) || + if ((lowerrootvp->v_type != VDIR && lowerrootvp->v_type != VREG && + lowerrootvp->v_type != VSOCK) || lowerrootvp->v_type != mp->mnt_vnodecovered->v_type) { NULLFSDEBUG("nullfs_mount: target must be same type as fspath"); vput(lowerrootvp); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 524fc51421d3..5a83a137b5bf 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3268,7 +3268,8 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, if ((error = namei(&nd)) != 0) return (error); - if ((nd.ni_vp->v_type == VREG || nd.ni_vp->v_type == VSOCK) && nd.ni_dvp->v_type != VDIR && + if ((nd.ni_vp->v_type == VREG || nd.ni_vp->v_type == VSOCK) && + nd.ni_dvp->v_type != VDIR && (nd.ni_vp->v_vflag & VV_ROOT) != 0) { struct vnode *covered_vp; @@ -5705,7 +5706,8 @@ cache_fplookup_climb_mount(struct cache_fpl *fpl) vp = fpl->tvp; vp_seqc = fpl->tvp_seqc; - VNPASS(vp->v_type == VDIR || vp->v_type == VREG || vp->v_type == VSOCK || vp->v_type == VBAD, vp); + VNPASS(vp->v_type == VDIR || vp->v_type == VREG || + vp->v_type == VSOCK || vp->v_type == VBAD, vp); mp = atomic_load_ptr(&vp->v_mountedhere); if (__predict_false(mp == NULL)) { return (0); @@ -5762,7 +5764,8 @@ cache_fplookup_cross_mount(struct cache_fpl *fpl) vp = fpl->tvp; vp_seqc = fpl->tvp_seqc; - VNPASS(vp->v_type == VDIR || vp->v_type == VREG || vp->v_type == VSOCK || vp->v_type == VBAD, vp); + VNPASS(vp->v_type == VDIR || vp->v_type == VREG || + vp->v_type == VSOCK || vp->v_type == VBAD, vp); mp = atomic_load_ptr(&vp->v_mountedhere); if (__predict_false(mp == NULL)) { return (0); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 77119e5ed655..4a0d043344bc 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1155,12 +1155,14 @@ vfs_domount_first( if (error == 0) error = vinvalbuf(vp, V_SAVE, 0, 0); if (vfsp->vfc_flags & VFCF_FILEMOUNT) { - if (error == 0 && vp->v_type != VDIR && vp->v_type != VREG && vp->v_type != VSOCK) + if (error == 0 && vp->v_type != VDIR && vp->v_type != VREG && + vp->v_type != VSOCK) error = EINVAL; /* * For file mounts, ensure that there is only one hardlink to the file. */ - if (error == 0 && (vp->v_type == VREG || vp->v_type == VSOCK) && va.va_nlink != 1) + if (error == 0 && (vp->v_type == VREG || vp->v_type == VSOCK) && + va.va_nlink != 1) error = EINVAL; } else { if (error == 0 && vp->v_type != VDIR) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b11ae42eb1a7..cf56f992a854 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1040,7 +1040,7 @@ vfs_busyfs(fsid_t *fsid) if (fsidcmp(&mp->mnt_stat.f_fsid, fsid) == 0) return (mp); else - vfs_unbusy(mp); + vfs_unbusy(mp); slow: mtx_lock(&mountlist_mtx);
