diff options
| -rw-r--r-- | usr/src/uts/common/fs/portfs/port.c | 8 | ||||
| -rw-r--r-- | usr/src/uts/common/os/aio_subr.c | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/portfs/port.c b/usr/src/uts/common/fs/portfs/port.c index abed5a98d5..ab73baf10f 100644 --- a/usr/src/uts/common/fs/portfs/port.c +++ b/usr/src/uts/common/fs/portfs/port.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1523,9 +1523,11 @@ portnowait: pgt->pgt_rqtp = rqtp; } else { /* timeout already checked -> remember values */ - pgt->pgt_timecheck = timecheck; - pgt->pgt_rqtime = *rqtp; pgt->pgt_rqtp = rqtp; + if (rqtp != NULL) { + pgt->pgt_timecheck = timecheck; + pgt->pgt_rqtime = *rqtp; + } } if (blocking) /* timeout remaining */ diff --git a/usr/src/uts/common/os/aio_subr.c b/usr/src/uts/common/os/aio_subr.c index f12cac257a..9bdd826581 100644 --- a/usr/src/uts/common/os/aio_subr.c +++ b/usr/src/uts/common/os/aio_subr.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1281,8 +1281,9 @@ aio_close_port(void *arg, int port, pid_t pid, int lastclose) return; } aiop->aio_portpendcnt += counter; + mutex_exit(&aiop->aio_mutex); while (aiop->aio_portpendcnt) - cv_wait(&aiop->aio_portcv, &aiop->aio_mutex); + cv_wait(&aiop->aio_portcv, &aiop->aio_portq_mutex); /* * all pending AIOs are completed. @@ -1290,7 +1291,6 @@ aio_close_port(void *arg, int port, pid_t pid, int lastclose) */ reqp = aiop->aio_portq; - mutex_exit(&aiop->aio_mutex); headp = NULL; for (; reqp != NULL; reqp = next) { next = reqp->aio_req_next; |
