From owner-dev-commits-src-branches@freebsd.org Wed Feb 24 07:59:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 054B4553F04; Wed, 24 Feb 2021 07:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpGN4xjrz4Zkb; Wed, 24 Feb 2021 07:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 451FD28B5C; Wed, 24 Feb 2021 07:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11O7x4WQ046816; Wed, 24 Feb 2021 07:59:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O7x46M046815; Wed, 24 Feb 2021 07:59:04 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:59:04 GMT Message-Id: <202102240759.11O7x46M046815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c6e46d0c6b9a - stable/13 - fifo: minor comment and assert improvements. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6e46d0c6b9a6a79333689c4bf735cb5456200a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:59:12 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c6e46d0c6b9a6a79333689c4bf735cb5456200a2 commit c6e46d0c6b9a6a79333689c4bf735cb5456200a2 Author: Konstantin Belousov AuthorDate: 2021-02-01 10:43:16 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:48:37 +0000 fifo: minor comment and assert improvements. (cherry picked from commit adf28ab45670329459aed8afeec2dbe91c9b3713) --- sys/kern/vfs_syscalls.c | 3 ++- sys/ufs/ufs/ufs_vnops.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index aba3d62936bb..a51d693446e3 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1183,7 +1183,8 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, * vnode operations here. */ if (fp->f_ops == &badfileops) { - KASSERT(vp->v_type != VFIFO, ("Unexpected fifo.")); + KASSERT(vp->v_type != VFIFO, + ("Unexpected fifo fp %p vp %p", fp, vp)); finit_vnode(fp, flags, NULL, &vnops); } diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index e6a78c3655cc..301c583291d1 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -252,9 +252,10 @@ ufs_mknod(ap) DIP_SET(ip, i_rdev, vap->va_rdev); } /* - * Remove inode, then reload it through VFS_VGET so it is - * checked to see if it is an alias of an existing entry in - * the inode cache. XXX I don't believe this is necessary now. + * Remove inode, then reload it through VFS_VGET(). This is + * needed to do further inode initialization, for instance + * fifo, which was too early for VFS_VGET() done as part of + * UFS_VALLOC(). */ (*vpp)->v_type = VNON; ino = ip->i_number; /* Save this before vgone() invalidates ip. */