diff options
author | Marcel Telka <marcel.telka@nexenta.com> | 2013-10-11 18:11:24 +0200 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2013-10-18 06:27:32 -0700 |
commit | 95fa57143512ab3a27c43d30a006cb21e0a55e28 (patch) | |
tree | 338585324730b3ab5dda07c9a296b2f2fb6932ef | |
parent | 38f4bddda7216cf3550c325e8cabe56d08a2bce9 (diff) | |
download | illumos-joyent-95fa57143512ab3a27c43d30a006cb21e0a55e28.tar.gz |
4198 Assertion failed in nlm_slock_wait()
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/uts/common/klm/nlm_impl.c | 8 | ||||
-rw-r--r-- | usr/src/uts/common/klm/nlm_service.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/uts/common/klm/nlm_impl.c b/usr/src/uts/common/klm/nlm_impl.c index 16051875aa..dd2418c741 100644 --- a/usr/src/uts/common/klm/nlm_impl.c +++ b/usr/src/uts/common/klm/nlm_impl.c @@ -1922,13 +1922,13 @@ nlm_slock_wait(struct nlm_globals *g, /* * If the granted message arrived before we got here, - * nw->nw_state will be GRANTED - in that case, don't sleep. + * nslp->nsl_state will be NLM_SL_GRANTED - in that case don't sleep. */ cv_res = 1; timeo_ticks = ddi_get_lbolt() + SEC_TO_TICK(timeo_secs); mutex_enter(&g->lock); - if (nslp->nsl_state == NLM_SL_BLOCKED) { + while (nslp->nsl_state == NLM_SL_BLOCKED && cv_res > 0) { cv_res = cv_timedwait_sig(&nslp->nsl_cond, &g->lock, timeo_ticks); } @@ -1944,7 +1944,7 @@ nlm_slock_wait(struct nlm_globals *g, } if (cv_res <= 0) { - /* We was woken up either by timeout or interrupt */ + /* We were woken up either by timeout or by interrupt */ error = (cv_res < 0) ? ETIMEDOUT : EINTR; /* @@ -1954,7 +1954,7 @@ nlm_slock_wait(struct nlm_globals *g, */ if (nslp->nsl_state == NLM_SL_GRANTED) error = 0; - } else { /* awaken via cv_signal or didn't block */ + } else { /* Awaken via cv_signal()/cv_broadcast() or didn't block */ error = 0; VERIFY(nslp->nsl_state == NLM_SL_GRANTED); } diff --git a/usr/src/uts/common/klm/nlm_service.c b/usr/src/uts/common/klm/nlm_service.c index 6526f244af..c170c1d208 100644 --- a/usr/src/uts/common/klm/nlm_service.c +++ b/usr/src/uts/common/klm/nlm_service.c @@ -26,8 +26,8 @@ */ /* - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -388,7 +388,7 @@ nlm_do_test(nlm4_testargs *argp, nlm4_testres *resp, out: /* - * If we have a callback funtion, use that to + * If we have a callback function, use that to * deliver the response via another RPC call. */ if (cb != NULL && rpcp != NULL) @@ -805,7 +805,7 @@ nlm_do_cancel(nlm4_cancargs *argp, nlm4_res *resp, out: /* - * If we have a callback funtion, use that to + * If we have a callback function, use that to * deliver the response via another RPC call. */ if (cb != NULL && rpcp != NULL) @@ -890,7 +890,7 @@ nlm_do_unlock(nlm4_unlockargs *argp, nlm4_res *resp, DTRACE_PROBE1(unlock__res, int, error); out: /* - * If we have a callback funtion, use that to + * If we have a callback function, use that to * deliver the response via another RPC call. */ if (cb != NULL && rpcp != NULL) @@ -962,7 +962,7 @@ nlm_do_granted(nlm4_testargs *argp, nlm4_res *resp, out: /* - * If we have a callback funtion, use that to + * If we have a callback function, use that to * deliver the response via another RPC call. */ if (cb != NULL && rpcp != NULL) |