[DLM] Update DLM to the latest patch level
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 024ace9..87df9616 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -162,7 +162,7 @@
struct space {
struct config_group group;
struct list_head members;
- struct semaphore members_lock;
+ struct mutex members_lock;
int members_count;
};
@@ -374,7 +374,7 @@
sp->group.default_groups[1] = NULL;
INIT_LIST_HEAD(&sp->members);
- init_MUTEX(&sp->members_lock);
+ mutex_init(&sp->members_lock);
sp->members_count = 0;
return &sp->group;
@@ -453,10 +453,10 @@
nd->nodeid = -1;
nd->weight = 1; /* default weight of 1 if none is set */
- down(&sp->members_lock);
+ mutex_lock(&sp->members_lock);
list_add(&nd->list, &sp->members);
sp->members_count++;
- up(&sp->members_lock);
+ mutex_unlock(&sp->members_lock);
return &nd->item;
}
@@ -466,10 +466,10 @@
struct space *sp = to_space(g->cg_item.ci_parent);
struct node *nd = to_node(i);
- down(&sp->members_lock);
+ mutex_lock(&sp->members_lock);
list_del(&nd->list);
sp->members_count--;
- up(&sp->members_lock);
+ mutex_unlock(&sp->members_lock);
config_item_put(i);
}
@@ -677,7 +677,7 @@
if (!sp)
return -EEXIST;
- down(&sp->members_lock);
+ mutex_lock(&sp->members_lock);
if (!sp->members_count) {
rv = 0;
goto out;
@@ -698,7 +698,7 @@
*ids_out = ids;
out:
- up(&sp->members_lock);
+ mutex_unlock(&sp->members_lock);
put_space(sp);
return rv;
}
@@ -713,14 +713,14 @@
if (!sp)
goto out;
- down(&sp->members_lock);
+ mutex_lock(&sp->members_lock);
list_for_each_entry(nd, &sp->members, list) {
if (nd->nodeid != nodeid)
continue;
w = nd->weight;
break;
}
- up(&sp->members_lock);
+ mutex_unlock(&sp->members_lock);
put_space(sp);
out:
return w;