Page MenuHomeFreeBSD

D46792.id143735.diff
No OneTemporary

D46792.id143735.diff

diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -112,6 +112,7 @@
static struct unp_head unp_shead; /* (l) List of stream sockets. */
static struct unp_head unp_dhead; /* (l) List of datagram sockets. */
static struct unp_head unp_sphead; /* (l) List of seqpacket sockets. */
+static struct mtx_pool *unp_vp_mtxpool;
struct unp_defer {
SLIST_ENTRY(unp_defer) ud_link;
@@ -679,7 +680,7 @@
vplock = NULL;
if ((vp = unp->unp_vnode) != NULL) {
- vplock = mtx_pool_find(mtxpool_sleep, vp);
+ vplock = mtx_pool_find(unp_vp_mtxpool, vp);
mtx_lock(vplock);
}
UNP_PCB_LOCK(unp);
@@ -748,7 +749,7 @@
UNP_PCB_UNLOCK_ASSERT(unp);
restart:
if ((vp = unp->unp_vnode) != NULL) {
- vplock = mtx_pool_find(mtxpool_sleep, vp);
+ vplock = mtx_pool_find(unp_vp_mtxpool, vp);
mtx_lock(vplock);
}
UNP_PCB_LOCK(unp);
@@ -1953,7 +1954,7 @@
unp = sotounpcb(so);
KASSERT(unp != NULL, ("unp_connect: unp == NULL"));
- vplock = mtx_pool_find(mtxpool_sleep, vp);
+ vplock = mtx_pool_find(unp_vp_mtxpool, vp);
mtx_lock(vplock);
VOP_UNP_CONNECT(vp, &unp2);
if (unp2 == NULL) {
@@ -2561,6 +2562,7 @@
TASK_INIT(&unp_defer_task, 0, unp_process_defers, NULL);
UNP_LINK_LOCK_INIT();
UNP_DEFERRED_LOCK_INIT();
+ unp_vp_mtxpool = mtx_pool_create("unp vp mtxpool", 1024, MTX_DEF);
}
SYSINIT(unp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_SECOND, unp_init, NULL);
@@ -3441,7 +3443,7 @@
("vfs_unp_reclaim: vp->v_type != VSOCK"));
active = 0;
- vplock = mtx_pool_find(mtxpool_sleep, vp);
+ vplock = mtx_pool_find(unp_vp_mtxpool, vp);
mtx_lock(vplock);
VOP_UNP_CONNECT(vp, &unp);
if (unp == NULL)

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 10:59 AM (21 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12876989
Default Alt Text
D46792.id143735.diff (1 KB)

Event Timeline