Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a2ffe1
)
Fix for cleanup deadlock
author
pschwan
<pschwan>
Fri, 21 Jun 2002 20:04:44 +0000
(20:04 +0000)
committer
pschwan
<pschwan>
Fri, 21 Jun 2002 20:04:44 +0000
(20:04 +0000)
lustre/ldlm/ldlm_resource.c
patch
|
blob
|
history
diff --git
a/lustre/ldlm/ldlm_resource.c
b/lustre/ldlm/ldlm_resource.c
index
39f2720
..
7d09521
100644
(file)
--- a/
lustre/ldlm/ldlm_resource.c
+++ b/
lustre/ldlm/ldlm_resource.c
@@
-73,6
+73,7
@@
static int cleanup_resource(struct ldlm_resource *res, struct list_head *q)
lock = list_entry(tmp, struct ldlm_lock, l_res_link);
if (client) {
+ spin_unlock(&res->lr_lock);
rc = ldlm_cli_cancel(lock->l_client, lock);
if (rc < 0) {
CERROR("ldlm_cli_cancel: %d\n", rc);
@@
-80,6
+81,8
@@
static int cleanup_resource(struct ldlm_resource *res, struct list_head *q)
}
if (rc == ELDLM_RESOURCE_FREED)
rc = 1;
+ else
+ spin_lock(&res->lr_lock);
} else {
CERROR("Freeing a lock still held by a client node.\n");