git: f0a4dd6d46e9 - main - mqueuefs: mark newly allocated vnode as constructed, under the lock

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 22 May 2024 22:13:45 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4

commit f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-05-22 02:39:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-05-22 22:13:29 +0000

    mqueuefs: mark newly allocated vnode as constructed, under the lock
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/uipc_mqueue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 6f8fbaacdfb4..7779d8877337 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -811,6 +811,7 @@ found:
 		panic("%s has unexpected type: %d", pn->mn_name, pn->mn_type);
 	}
 	sx_xunlock(&mqfs->mi_lock);
+	vn_set_state(*vpp, VSTATE_CONSTRUCTED);
 	return (0);
 }