The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e40c72c823c6502906d4024933f0c119b5ca17cf
commit e40c72c823c6502906d4024933f0c119b5ca17cf Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-09-22 16:30:11 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-09-24 18:38:33 +0000 VFS: style Wrap long lines, related to the nullfs mounts over regular files and sockets type checks. Also fix indent. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- 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 6692ae6facf9..4dd69ee47e82 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3292,7 +3292,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; @@ -5729,7 +5730,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); @@ -5786,7 +5788,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 265e95ee0a75..b784c148ff1d 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1171,12 +1171,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 34f7b32de1b9..7ca82e7e576f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1044,7 +1044,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);
