aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/config.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 13:52:55 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 13:52:55 -0400
commitadd096909da63ef32d6766f6771c07c9f16c6ee5 (patch)
tree58594bcf68cbb6f777d5270d098ab8ca69cbaee3 /fs/dlm/config.c
parente245befce7af0a1e1347079ed62695b059594bd4 (diff)
parent54c57dc3b6578356c0a428c767d4bf080254a2ee (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (32 commits) [PATCH] ocfs2: zero_user_page conversion ocfs2: Support xfs style space reservation ioctls ocfs2: support for removing file regions ocfs2: update truncate handling of partial clusters ocfs2: btree support for removal of arbirtrary extents ocfs2: Support creation of unwritten extents ocfs2: support writing of unwritten extents ocfs2: small cleanup of ocfs2_write_begin_nolock() ocfs2: btree changes for unwritten extents ocfs2: abstract btree growing calls ocfs2: use all extent block suballocators ocfs2: plug truncate into cached dealloc routines ocfs2: simplify deallocation locking ocfs2: harden buffer check during mapping of page blocks ocfs2: shared writeable mmap ocfs2: factor out write aops into nolock variants ocfs2: rework ocfs2_buffered_write_cluster() ocfs2: take ip_alloc_sem during entire truncate ocfs2: Add "preferred slot" mount option [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in fs/ocfs2/dlm/dlmrecovery.c ...
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r--fs/dlm/config.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 5069b2cb5a1f..2f8e3c81bc19 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -133,14 +133,6 @@ static ssize_t cluster_set(struct cluster *cl, unsigned int *cl_field,
133 return len; 133 return len;
134} 134}
135 135
136#define __CONFIGFS_ATTR(_name,_mode,_read,_write) { \
137 .attr = { .ca_name = __stringify(_name), \
138 .ca_mode = _mode, \
139 .ca_owner = THIS_MODULE }, \
140 .show = _read, \
141 .store = _write, \
142}
143
144#define CLUSTER_ATTR(name, check_zero) \ 136#define CLUSTER_ATTR(name, check_zero) \
145static ssize_t name##_write(struct cluster *cl, const char *buf, size_t len) \ 137static ssize_t name##_write(struct cluster *cl, const char *buf, size_t len) \
146{ \ 138{ \
@@ -615,7 +607,7 @@ static struct clusters clusters_root = {
615int dlm_config_init(void) 607int dlm_config_init(void)
616{ 608{
617 config_group_init(&clusters_root.subsys.su_group); 609 config_group_init(&clusters_root.subsys.su_group);
618 init_MUTEX(&clusters_root.subsys.su_sem); 610 mutex_init(&clusters_root.subsys.su_mutex);
619 return configfs_register_subsystem(&clusters_root.subsys); 611 return configfs_register_subsystem(&clusters_root.subsys);
620} 612}
621 613
@@ -759,9 +751,9 @@ static struct space *get_space(char *name)
759 if (!space_list) 751 if (!space_list)
760 return NULL; 752 return NULL;
761 753
762 down(&space_list->cg_subsys->su_sem); 754 mutex_lock(&space_list->cg_subsys->su_mutex);
763 i = config_group_find_obj(space_list, name); 755 i = config_group_find_item(space_list, name);
764 up(&space_list->cg_subsys->su_sem); 756 mutex_unlock(&space_list->cg_subsys->su_mutex);
765 757
766 return to_space(i); 758 return to_space(i);
767} 759}
@@ -780,7 +772,7 @@ static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr)
780 if (!comm_list) 772 if (!comm_list)
781 return NULL; 773 return NULL;
782 774
783 down(&clusters_root.subsys.su_sem); 775 mutex_lock(&clusters_root.subsys.su_mutex);
784 776
785 list_for_each_entry(i, &comm_list->cg_children, ci_entry) { 777 list_for_each_entry(i, &comm_list->cg_children, ci_entry) {
786 cm = to_comm(i); 778 cm = to_comm(i);
@@ -800,7 +792,7 @@ static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr)
800 break; 792 break;
801 } 793 }
802 } 794 }
803 up(&clusters_root.subsys.su_sem); 795 mutex_unlock(&clusters_root.subsys.su_mutex);
804 796
805 if (!found) 797 if (!found)
806 cm = NULL; 798 cm = NULL;