From: tappro Date: Sun, 17 Sep 2006 22:36:39 +0000 (+0000) Subject: - fix for sanity test 48a in CMD. lock can be lost in case of -ESTALE X-Git-Tag: v1_8_0_110~486^2~925 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=5e0f1fc3d1972a58b594b2dc4d2e353506f8eee2;p=fs%2Flustre-release.git - fix for sanity test 48a in CMD. lock can be lost in case of -ESTALE --- diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 0453db8..4eabff0 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -119,8 +119,7 @@ int lmv_intent_remote(struct obd_export *exp, void *lmm, */ if (rc == 0) { lmv_drop_intent_lock(it); - memcpy(&it->d.lustre.it_lock_handle, &plock, - sizeof(plock)); + memcpy(&it->d.lustre.it_lock_handle, &plock, sizeof(plock)); it->d.lustre.it_lock_mode = pmode; } @@ -249,7 +248,12 @@ repeat: /* client switches to new sequence, setup fld */ goto repeat; } + } else if (rc == -ESTALE && it->d.lustre.it_lock_mode) { + /* cross-ref open can have lookup lock on child */ + ldlm_lock_decref(&it->d.lustre.it_lock_handle, + it->d.lustre.it_lock_mode); } + if (rc != 0) GOTO(out_free_sop_data, rc);