From 5e0f1fc3d1972a58b594b2dc4d2e353506f8eee2 Mon Sep 17 00:00:00 2001 From: tappro Date: Sun, 17 Sep 2006 22:36:39 +0000 Subject: [PATCH] - fix for sanity test 48a in CMD. lock can be lost in case of -ESTALE --- lustre/lmv/lmv_intent.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 1.8.3.1