diff options
-rw-r--r-- | usr/src/uts/common/klm/klmops.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/klm/nlm_client.c | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/usr/src/uts/common/klm/klmops.c b/usr/src/uts/common/klm/klmops.c index a8adbe76c1..2036ead94d 100644 --- a/usr/src/uts/common/klm/klmops.c +++ b/usr/src/uts/common/klm/klmops.c @@ -123,9 +123,7 @@ lm4_shrlock(struct vnode *vp, int cmd, } /* - * Helper for lm_frlock, lm4_frlock, nfs_lockrelease - * After getting a lock from a remote lock manager, - * register the lock locally. + * Helper for nfs_lockrelease. */ void lm_register_lock_locally(struct vnode *vp, struct lm_sysid *ls, 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; } |