summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/klm/nlm_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/klm/nlm_client.c')
-rw-r--r--usr/src/uts/common/klm/nlm_client.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/src/uts/common/klm/nlm_client.c b/usr/src/uts/common/klm/nlm_client.c
index ca513afb15..8ae6b3682f 100644
--- a/usr/src/uts/common/klm/nlm_client.c
+++ b/usr/src/uts/common/klm/nlm_client.c
@@ -28,6 +28,7 @@
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2014, Joyent, Inc. All rights reserved.
*/
/*
@@ -619,6 +620,23 @@ nlm_register_lock_locally(struct vnode *vp, struct nlm_host *hostp,
{
int sysid = 0;
+ if (hostp == NULL) {
+ mntinfo_t *mi;
+ servinfo_t *sv;
+ const char *netid;
+ struct nlm_globals *g;
+
+ mi = VTOMI(vp);
+ sv = mi->mi_curr_serv;
+ netid = nlm_knc_to_netid(sv->sv_knconf);
+
+ if (netid != NULL) {
+ g = zone_getspecific(nlm_zone_key, curzone);
+ hostp = nlm_host_findcreate(g, sv->sv_hostname,
+ netid, &sv->sv_addr);
+ }
+ }
+
if (hostp != NULL) {
sysid = hostp->nh_sysid | LM_SYSID_CLIENT;
}