aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/dlmglue.c9
-rw-r--r--fs/ocfs2/dlmglue.h5
-rw-r--r--fs/ocfs2/stackglue.c8
-rw-r--r--fs/ocfs2/stackglue.h3
-rw-r--r--fs/ocfs2/super.c6
5 files changed, 9 insertions, 22 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index f41ff1c10ae8..8a9c84909be3 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3366,16 +3366,11 @@ static struct ocfs2_locking_protocol lproto = {
3366 .lp_unlock_ast = ocfs2_unlock_ast, 3366 .lp_unlock_ast = ocfs2_unlock_ast,
3367}; 3367};
3368 3368
3369/* This interface isn't the final one, hence the less-than-perfect names */ 3369void ocfs2_set_locking_protocol(void)
3370void dlmglue_init_stack(void)
3371{ 3370{
3372 o2cb_get_stack(&lproto); 3371 ocfs2_stack_glue_set_locking_protocol(&lproto);
3373} 3372}
3374 3373
3375void dlmglue_exit_stack(void)
3376{
3377 o2cb_put_stack();
3378}
3379 3374
3380static void ocfs2_process_blocked_lock(struct ocfs2_super *osb, 3375static void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
3381 struct ocfs2_lock_res *lockres) 3376 struct ocfs2_lock_res *lockres)
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h
index 2d0a8a03c431..34b7598a0dc6 100644
--- a/fs/ocfs2/dlmglue.h
+++ b/fs/ocfs2/dlmglue.h
@@ -114,7 +114,6 @@ void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb);
114struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); 114struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void);
115void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug); 115void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug);
116 116
117void dlmglue_init_stack(void); 117/* To set the locking protocol on module initialization */
118void dlmglue_exit_stack(void); 118void ocfs2_set_locking_protocol(void);
119
120#endif /* DLMGLUE_H */ 119#endif /* DLMGLUE_H */
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index bd805411a856..51c2546b328d 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -429,14 +429,10 @@ int ocfs2_cluster_this_node(unsigned int *node)
429 return 0; 429 return 0;
430} 430}
431 431
432void o2cb_get_stack(struct ocfs2_locking_protocol *proto) 432void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto)
433{ 433{
434 BUG_ON(proto == NULL); 434 BUG_ON(proto != NULL);
435 435
436 lproto = proto; 436 lproto = proto;
437} 437}
438 438
439void o2cb_put_stack(void)
440{
441 lproto = NULL;
442}
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
index 01e3c9b9192a..decb147106fd 100644
--- a/fs/ocfs2/stackglue.h
+++ b/fs/ocfs2/stackglue.h
@@ -93,7 +93,6 @@ int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb);
93void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); 93void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);
94void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb); 94void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb);
95 95
96void o2cb_get_stack(struct ocfs2_locking_protocol *proto); 96void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto);
97void o2cb_put_stack(void);
98 97
99#endif /* STACKGLUE_H */ 98#endif /* STACKGLUE_H */
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index fa9c46e2eab8..b4a02a00665d 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -922,8 +922,6 @@ static int __init ocfs2_init(void)
922 922
923 ocfs2_print_version(); 923 ocfs2_print_version();
924 924
925 dlmglue_init_stack();
926
927 status = init_ocfs2_uptodate_cache(); 925 status = init_ocfs2_uptodate_cache();
928 if (status < 0) { 926 if (status < 0) {
929 mlog_errno(status); 927 mlog_errno(status);
@@ -948,6 +946,8 @@ static int __init ocfs2_init(void)
948 mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); 946 mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
949 } 947 }
950 948
949 ocfs2_set_locking_protocol();
950
951leave: 951leave:
952 if (status < 0) { 952 if (status < 0) {
953 ocfs2_free_mem_caches(); 953 ocfs2_free_mem_caches();
@@ -979,8 +979,6 @@ static void __exit ocfs2_exit(void)
979 979
980 exit_ocfs2_uptodate_cache(); 980 exit_ocfs2_uptodate_cache();
981 981
982 dlmglue_exit_stack();
983
984 mlog_exit_void(); 982 mlog_exit_void();
985} 983}
986 984