summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/brand/lx/procfs/lx_prsubr.c10
-rw-r--r--usr/src/uts/common/brand/lx/sysfs/lx_syssubr.c11
2 files changed, 2 insertions, 19 deletions
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_prsubr.c b/usr/src/uts/common/brand/lx/procfs/lx_prsubr.c
index 08d40a4a67..07dc432329 100644
--- a/usr/src/uts/common/brand/lx/procfs/lx_prsubr.c
+++ b/usr/src/uts/common/brand/lx/procfs/lx_prsubr.c
@@ -284,15 +284,7 @@ retry:
netstack_t *
lxpr_netstack(lxpr_node_t *lxpnp)
{
- netstack_t *ns;
-
- ns = LXPTOZ(lxpnp)->zone_netstack;
- ASSERT(ns != NULL);
- if (ns->netstack_flags & (NSF_UNINIT | NSF_CLOSING))
- return (NULL);
-
- netstack_hold(ns);
- return (ns);
+ return (netstack_hold_if_active(LXPTOZ(lxpnp)->zone_netstack));
}
/*
diff --git a/usr/src/uts/common/brand/lx/sysfs/lx_syssubr.c b/usr/src/uts/common/brand/lx/sysfs/lx_syssubr.c
index e80acbcfe5..69234ddbaa 100644
--- a/usr/src/uts/common/brand/lx/sysfs/lx_syssubr.c
+++ b/usr/src/uts/common/brand/lx/sysfs/lx_syssubr.c
@@ -281,17 +281,8 @@ netstack_t *
lxsys_netstack(lxsys_node_t *lnp)
{
zone_t *zone = VTOLXSM(LXSTOV(lnp))->lxsysm_zone;
- netstack_t *ns = zone->zone_netstack;
- VERIFY(ns != NULL);
-
- if (ns->netstack_flags & (NSF_UNINIT|NSF_CLOSING)) {
- ns = NULL;
- } else {
- netstack_hold(ns);
- }
-
- return (ns);
+ return (netstack_hold_if_active(zone->zone_netstack));
}
ill_t *