aboutsummaryrefslogtreecommitdiff
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 a309b799dff..3b0dfd7ae26 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,
str->namelen = GDLM_STRNAME_BYTES;
}
-int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name,
- struct gdlm_lock **lpp)
+static int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name,
+ struct gdlm_lock **lpp)
{
struct gdlm_lock *lp;
@@ -276,7 +276,7 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp)
return LM_OUT_ASYNC;
}
-unsigned int gdlm_do_unlock(struct gdlm_lock *lp)
+static unsigned int gdlm_do_unlock(struct gdlm_lock *lp)
{
struct gdlm_ls *ls = lp->ls;
unsigned int lkf = 0;
@@ -378,7 +378,7 @@ void gdlm_cancel(lm_lock_t *lock)
clear_bit(LFL_DLM_CANCEL, &lp->flags);
}
-int gdlm_add_lvb(struct gdlm_lock *lp)
+static int gdlm_add_lvb(struct gdlm_lock *lp)
{
char *lvb;
@@ -391,7 +391,7 @@ int gdlm_add_lvb(struct gdlm_lock *lp)
return 0;
}
-void gdlm_del_lvb(struct gdlm_lock *lp)
+static void gdlm_del_lvb(struct gdlm_lock *lp)
{
kfree(lp->lvb);
lp->lvb = NULL;
diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h
index e6c1e4786fe..530c2f54258 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);
void gdlm_queue_delayed(struct gdlm_lock *);
void gdlm_submit_delayed(struct gdlm_ls *);
int gdlm_release_all_locks(struct gdlm_ls *);
-int gdlm_create_lp(struct gdlm_ls *, struct lm_lockname *, struct gdlm_lock **);
void gdlm_delete_lp(struct gdlm_lock *);
-int gdlm_add_lvb(struct gdlm_lock *);
-void gdlm_del_lvb(struct gdlm_lock *);
unsigned int gdlm_do_lock(struct gdlm_lock *);
-unsigned int gdlm_do_unlock(struct gdlm_lock *);
int gdlm_get_lock(lm_lockspace_t *, struct lm_lockname *, lm_lock_t **);
void gdlm_put_lock(lm_lock_t *);
diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c
index 3c9adf18fd9..89728c91665 100644
--- a/fs/gfs2/locking/dlm/main.c
+++ b/fs/gfs2/locking/dlm/main.c
@@ -16,7 +16,7 @@ extern int gdlm_drop_period;
extern struct lm_lockops gdlm_ops;
-int __init init_lock_dlm(void)
+static int __init init_lock_dlm(void)
{
int error;
@@ -48,7 +48,7 @@ int __init init_lock_dlm(void)
return 0;
}
-void __exit exit_lock_dlm(void)
+static void __exit exit_lock_dlm(void)
{
gdlm_plock_exit();
gdlm_sysfs_exit();
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index ecd37371eba..97ffac5cdef 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -21,7 +21,7 @@ struct nolock_lockspace {
unsigned int nl_lvb_size;
};
-struct lm_lockops nolock_ops;
+static struct lm_lockops nolock_ops;
static int nolock_mount(char *table_name, char *host_data,
lm_callback_t cb, lm_fsdata_t *fsdata,
@@ -208,7 +208,7 @@ static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid,
{
}
-struct lm_lockops nolock_ops = {
+static struct lm_lockops nolock_ops = {
.lm_proto_name = "lock_nolock",
.lm_mount = nolock_mount,
.lm_others_may_mount = nolock_others_may_mount,
@@ -229,7 +229,7 @@ struct lm_lockops nolock_ops = {
.lm_owner = THIS_MODULE,
};
-int __init init_nolock(void)
+static int __init init_nolock(void)
{
int error;
@@ -245,7 +245,7 @@ int __init init_nolock(void)
return 0;
}
-void __exit exit_nolock(void)
+static void __exit exit_nolock(void)
{
gfs_unregister_lockproto(&nolock_ops);
}