From 60c5c866aab245a3b69b18f6707967031ac0da2a Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 4 Jun 2014 15:30:49 +0000 Subject: [PATCH] Allow shared locking for the tmpfs vnodes. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/fs/tmpfs/tmpfs_subr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index a9a690eec00d..b32ec7b195fa 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -595,6 +595,8 @@ tmpfs_alloc_vp(struct mount *mp, struct tmpfs_node *node, int lkflag, default: panic("tmpfs_alloc_vp: type %p %d", node, (int)node->tn_type); } + if (vp->v_type != VFIFO) + VN_LOCK_ASHARE(vp); error = insmntque1(vp, mp, tmpfs_insmntque_dtr, NULL); if (error)