From 3fe6c5ce1176cf661dbe71fc43b627c1a742a89a Mon Sep 17 00:00:00 2001 From: Satyam Sharma Date: Wed, 4 Jul 2007 16:37:16 +0530 Subject: [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearly Configfs being based upon sysfs code, config_group_find_obj() is probably so named because of the similar kset_find_obj() in sysfs. However, "kobject"s in sysfs become "config_item"s in configfs, so let's call it config_group_find_item() instead, for sake of uniformity, and make corresponding change in the users of this function. BTW a crucial difference between kset_find_obj and config_group_find_item is in locking expectations. kset_find_obj does its locking by itself, but config_group_find_item expects the *caller* to do the locking. The reason for this: kset's have their own locks, config_group's don't but instead rely on the subsystem mutex. And, subsystem needn't necessarily be around when config_group_find_item() is called. So let's state these locking semantics explicitly, and rectify the comment, otherwise bugs could continue to occur in future, as they did in the past (refer commit d82b8191e238 in gfs2-2.6-fixes.git). [ I also took the opportunity to fix some bad whitespace and double-empty lines. --Joel ] [ Conflict in fs/dlm/config.c with commit 3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ] Signed-off-by: Satyam Sharma Cc: David Teigland Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh --- fs/dlm/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/dlm/config.c') diff --git a/fs/dlm/config.c b/fs/dlm/config.c index e47eb42406fa..4348cb42cf17 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -752,7 +752,7 @@ static struct space *get_space(char *name) return NULL; down(&space_list->cg_subsys->su_sem); - i = config_group_find_obj(space_list, name); + i = config_group_find_item(space_list, name); up(&space_list->cg_subsys->su_sem); return to_space(i); -- cgit v1.2.3