From 2eee6c9289771fad66e307323feb29a00c7a6426 Mon Sep 17 00:00:00 2001 From: yury Date: Sun, 1 Oct 2006 15:30:11 +0000 Subject: [PATCH] - fixes in lmv which caused attempt to release already released locks. --- lustre/lmv/lmv_intent.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index cee9b9a..3acbd66 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -50,6 +50,7 @@ static inline void lmv_drop_intent_lock(struct lookup_intent *it) if (it->d.lustre.it_lock_mode != 0) { ldlm_lock_decref((void *)&it->d.lustre.it_lock_handle, it->d.lustre.it_lock_mode); + it->d.lustre.it_lock_mode = 0; } } @@ -249,13 +250,8 @@ repeat: /* client switches to new sequence, setup fld */ goto repeat; } - } else if (rc == -ESTALE && it->d.lustre.it_lock_mode) { - struct lustre_handle *handle; - /* cross-ref open can have lookup lock on child */ - handle = (struct lustre_handle *)&it->d.lustre.it_lock_handle; - ldlm_lock_decref(handle, it->d.lustre.it_lock_mode); } - + if (rc != 0) GOTO(out_free_sop_data, rc); @@ -604,8 +600,10 @@ int lmv_lookup_slaves(struct obd_export *exp, struct ptlrpc_request **reqp) release_lock: lmv_update_body(body, obj->lo_inodes + i); - if (it.d.lustre.it_lock_mode) + if (it.d.lustre.it_lock_mode) { ldlm_lock_decref(lockh, it.d.lustre.it_lock_mode); + it.d.lustre.it_lock_mode = 0; + } } EXIT; @@ -954,8 +952,10 @@ update: release_lock: size += obj->lo_inodes[i].li_size; - if (it.d.lustre.it_lock_mode) + if (it.d.lustre.it_lock_mode) { ldlm_lock_decref(lockh, it.d.lustre.it_lock_mode); + it.d.lustre.it_lock_mode = 0; + } } if (*reqp) { -- 1.8.3.1