summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_client.c36
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_vnops.c6
2 files changed, 9 insertions, 33 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_client.c b/usr/src/uts/common/fs/nfs/nfs4_client.c
index 5456fc7c63..856da430ea 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_client.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_client.c
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
+ * Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All Rights Reserved
*/
@@ -464,33 +464,15 @@ nfs4_attr_cache(vnode_t *vp, nfs4_ga_res_t *garp,
rp = VTOR4(vp);
mutex_enter(&rp->r_statelock);
was_serial = (rp->r_serial == curthread);
- if (rp->r_serial && !was_serial) {
- klwp_t *lwp = ttolwp(curthread);
-
+ if (rp->r_serial != NULL && !was_serial) {
/*
- * If we're the recovery thread, then purge current attrs
- * and bail out to avoid potential deadlock between another
- * thread caching attrs (r_serial thread), recov thread,
- * and an async writer thread.
+ * Purge current attrs and bail out to avoid potential deadlock
+ * between another thread caching attrs (r_serial thread), this
+ * thread, and a thread trying to read or write pages.
*/
- if (recov) {
- PURGE_ATTRCACHE4_LOCKED(rp);
- mutex_exit(&rp->r_statelock);
- return;
- }
-
- if (lwp != NULL)
- lwp->lwp_nostop++;
- while (rp->r_serial != NULL) {
- if (!cv_wait_sig(&rp->r_cv, &rp->r_statelock)) {
- mutex_exit(&rp->r_statelock);
- if (lwp != NULL)
- lwp->lwp_nostop--;
- return;
- }
- }
- if (lwp != NULL)
- lwp->lwp_nostop--;
+ PURGE_ATTRCACHE4_LOCKED(rp);
+ mutex_exit(&rp->r_statelock);
+ return;
}
/*
@@ -3067,7 +3049,7 @@ nfs_free_mi4(mntinfo4_t *mi)
nfs4_oo_hash_bucket_t *bucketp;
nfs4_debug_msg_t *msgp;
int i;
- servinfo4_t *svp;
+ servinfo4_t *svp;
/*
* Code introduced here should be carefully evaluated to make
diff --git a/usr/src/uts/common/fs/nfs/nfs4_vnops.c b/usr/src/uts/common/fs/nfs/nfs4_vnops.c
index 9f4099c3f8..db93bf2e72 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_vnops.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_vnops.c
@@ -2596,12 +2596,6 @@ nfs4close_otw(rnode4_t *rp, cred_t *cred_otw, nfs4_open_owner_t *oop,
osp->os_ref_count--;
if (ep->error == 0) {
- /*
- * Avoid a deadlock with the r_serial thread waiting for
- * os_sync_lock in nfs4_get_otw_cred_by_osp() which might be
- * held by us. We will wait in nfs4_attr_cache() for the
- * completion of the r_serial thread.
- */
mutex_exit(&osp->os_sync_lock);
*have_sync_lockp = 0;