aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-04-28 10:59:12 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-04-28 10:59:12 -0400
commit08bc2dbc7327e89b9d5b9c8ef9401d1df2622fca (patch)
tree2c16cbd9f5bd856b00ef0a0d9f88b3afa67712ee /fs/gfs2/locking
parentc56b39cd2c55d521597f04bbd872a08d1c4373ca (diff)
[GFS2] [-mm patch] fs/gfs2/: possible cleanups
This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused functions - remove the following global function that was both unused and unimplemented: - super.c: gfs2_do_upgrade() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/locking')
-rw-r--r--fs/gfs2/locking/dlm/lock.c10
-rw-r--r--fs/gfs2/locking/dlm/lock_dlm.h4
-rw-r--r--fs/gfs2/locking/dlm/main.c4
-rw-r--r--fs/gfs2/locking/nolock/main.c8
4 files changed, 11 insertions, 15 deletions
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index a309b799dff1..3b0dfd7ae26e 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -158,8 +158,8 @@ static inline void make_strname(struct lm_lockname *lockname,
158 str->namelen = GDLM_STRNAME_BYTES; 158 str->namelen = GDLM_STRNAME_BYTES;
159} 159}
160 160
161int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name, 161static int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name,
162 struct gdlm_lock **lpp) 162 struct gdlm_lock **lpp)
163{ 163{
164 struct gdlm_lock *lp; 164 struct gdlm_lock *lp;
165 165
@@ -276,7 +276,7 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp)
276 return LM_OUT_ASYNC; 276 return LM_OUT_ASYNC;
277} 277}
278 278
279unsigned int gdlm_do_unlock(struct gdlm_lock *lp) 279static unsigned int gdlm_do_unlock(struct gdlm_lock *lp)
280{ 280{
281 struct gdlm_ls *ls = lp->ls; 281 struct gdlm_ls *ls = lp->ls;
282 unsigned int lkf = 0; 282 unsigned int lkf = 0;
@@ -378,7 +378,7 @@ void gdlm_cancel(lm_lock_t *lock)
378 clear_bit(LFL_DLM_CANCEL, &lp->flags); 378 clear_bit(LFL_DLM_CANCEL, &lp->flags);
379} 379}
380 380
381int gdlm_add_lvb(struct gdlm_lock *lp) 381static int gdlm_add_lvb(struct gdlm_lock *lp)
382{ 382{
383 char *lvb; 383 char *lvb;
384 384
@@ -391,7 +391,7 @@ int gdlm_add_lvb(struct gdlm_lock *lp)
391 return 0; 391 return 0;
392} 392}
393 393
394void gdlm_del_lvb(struct gdlm_lock *lp) 394static void gdlm_del_lvb(struct gdlm_lock *lp)
395{ 395{
396 kfree(lp->lvb); 396 kfree(lp->lvb);
397 lp->lvb = NULL; 397 lp->lvb = NULL;
diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h
index e6c1e4786fec..530c2f542584 100644
--- a/fs/gfs2/locking/dlm/lock_dlm.h
+++ b/fs/gfs2/locking/dlm/lock_dlm.h
@@ -162,12 +162,8 @@ int16_t gdlm_make_lmstate(int16_t);
162void gdlm_queue_delayed(struct gdlm_lock *); 162void gdlm_queue_delayed(struct gdlm_lock *);
163void gdlm_submit_delayed(struct gdlm_ls *); 163void gdlm_submit_delayed(struct gdlm_ls *);
164int gdlm_release_all_locks(struct gdlm_ls *); 164int gdlm_release_all_locks(struct gdlm_ls *);
165int gdlm_create_lp(struct gdlm_ls *, struct lm_lockname *, struct gdlm_lock **);
166void gdlm_delete_lp(struct gdlm_lock *); 165void gdlm_delete_lp(struct gdlm_lock *);
167int gdlm_add_lvb(struct gdlm_lock *);
168void gdlm_del_lvb(struct gdlm_lock *);
169unsigned int gdlm_do_lock(struct gdlm_lock *); 166unsigned int gdlm_do_lock(struct gdlm_lock *);
170unsigned int gdlm_do_unlock(struct gdlm_lock *);
171 167
172int gdlm_get_lock(lm_lockspace_t *, struct lm_lockname *, lm_lock_t **); 168int gdlm_get_lock(lm_lockspace_t *, struct lm_lockname *, lm_lock_t **);
173void gdlm_put_lock(lm_lock_t *); 169void gdlm_put_lock(lm_lock_t *);
diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c
index 3c9adf18fd9c..89728c91665f 100644
--- a/fs/gfs2/locking/dlm/main.c
+++ b/fs/gfs2/locking/dlm/main.c
@@ -16,7 +16,7 @@ extern int gdlm_drop_period;
16 16
17extern struct lm_lockops gdlm_ops; 17extern struct lm_lockops gdlm_ops;
18 18
19int __init init_lock_dlm(void) 19static int __init init_lock_dlm(void)
20{ 20{
21 int error; 21 int error;
22 22
@@ -48,7 +48,7 @@ int __init init_lock_dlm(void)
48 return 0; 48 return 0;
49} 49}
50 50
51void __exit exit_lock_dlm(void) 51static void __exit exit_lock_dlm(void)
52{ 52{
53 gdlm_plock_exit(); 53 gdlm_plock_exit();
54 gdlm_sysfs_exit(); 54 gdlm_sysfs_exit();
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index ecd37371eba5..97ffac5cdefb 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -21,7 +21,7 @@ struct nolock_lockspace {
21 unsigned int nl_lvb_size; 21 unsigned int nl_lvb_size;
22}; 22};
23 23
24struct lm_lockops nolock_ops; 24static struct lm_lockops nolock_ops;
25 25
26static int nolock_mount(char *table_name, char *host_data, 26static int nolock_mount(char *table_name, char *host_data,
27 lm_callback_t cb, lm_fsdata_t *fsdata, 27 lm_callback_t cb, lm_fsdata_t *fsdata,
@@ -208,7 +208,7 @@ static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid,
208{ 208{
209} 209}
210 210
211struct lm_lockops nolock_ops = { 211static struct lm_lockops nolock_ops = {
212 .lm_proto_name = "lock_nolock", 212 .lm_proto_name = "lock_nolock",
213 .lm_mount = nolock_mount, 213 .lm_mount = nolock_mount,
214 .lm_others_may_mount = nolock_others_may_mount, 214 .lm_others_may_mount = nolock_others_may_mount,
@@ -229,7 +229,7 @@ struct lm_lockops nolock_ops = {
229 .lm_owner = THIS_MODULE, 229 .lm_owner = THIS_MODULE,
230}; 230};
231 231
232int __init init_nolock(void) 232static int __init init_nolock(void)
233{ 233{
234 int error; 234 int error;
235 235
@@ -245,7 +245,7 @@ int __init init_nolock(void)
245 return 0; 245 return 0;
246} 246}
247 247
248void __exit exit_nolock(void) 248static void __exit exit_nolock(void)
249{ 249{
250 gfs_unregister_lockproto(&nolock_ops); 250 gfs_unregister_lockproto(&nolock_ops);
251} 251}