mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
configfs: Convert subsystem semaphore to mutex
Convert the su_sem member of struct configfs_subsystem to a struct
mutex, as that's what it is. Also convert all the users and update
Documentation/configfs.txt and Documentation/configfs_example.c
accordingly.
[ Conflict in fs/dlm/config.c with commit
3168b0780d manually resolved. --Mark ]
Inspired-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
@@ -607,7 +607,7 @@ static struct clusters clusters_root = {
|
||||
int dlm_config_init(void)
|
||||
{
|
||||
config_group_init(&clusters_root.subsys.su_group);
|
||||
init_MUTEX(&clusters_root.subsys.su_sem);
|
||||
mutex_init(&clusters_root.subsys.su_mutex);
|
||||
return configfs_register_subsystem(&clusters_root.subsys);
|
||||
}
|
||||
|
||||
@@ -751,9 +751,9 @@ static struct space *get_space(char *name)
|
||||
if (!space_list)
|
||||
return NULL;
|
||||
|
||||
down(&space_list->cg_subsys->su_sem);
|
||||
mutex_lock(&space_list->cg_subsys->su_mutex);
|
||||
i = config_group_find_item(space_list, name);
|
||||
up(&space_list->cg_subsys->su_sem);
|
||||
mutex_unlock(&space_list->cg_subsys->su_mutex);
|
||||
|
||||
return to_space(i);
|
||||
}
|
||||
@@ -772,7 +772,7 @@ static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr)
|
||||
if (!comm_list)
|
||||
return NULL;
|
||||
|
||||
down(&clusters_root.subsys.su_sem);
|
||||
mutex_lock(&clusters_root.subsys.su_mutex);
|
||||
|
||||
list_for_each_entry(i, &comm_list->cg_children, ci_entry) {
|
||||
cm = to_comm(i);
|
||||
@@ -792,7 +792,7 @@ static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
up(&clusters_root.subsys.su_sem);
|
||||
mutex_unlock(&clusters_root.subsys.su_mutex);
|
||||
|
||||
if (!found)
|
||||
cm = NULL;
|
||||
|
||||
Reference in New Issue
Block a user