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:
[PATCH 3/3] ocfs2/net: Silence build warnings
[PATCH 2/3] ocfs2/dlm: Silence build warnings
[PATCH 1/3] ocfs2/net: Silence build warnings
ocfs2: Rename 'user_stack' plugin structure to 'ocfs2_user_plugin'

+75 -53
+9 -19
fs/ocfs2/cluster/tcp.c
··· 142 142 static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); 143 143 static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); 144 144 145 - static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, 146 - u32 msgkey, struct task_struct *task, u8 node) 147 - { 148 145 #ifdef CONFIG_DEBUG_FS 146 + void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, 147 + u32 msgkey, struct task_struct *task, u8 node) 148 + { 149 149 INIT_LIST_HEAD(&nst->st_net_debug_item); 150 150 nst->st_task = task; 151 151 nst->st_msg_type = msgtype; 152 152 nst->st_msg_key = msgkey; 153 153 nst->st_node = node; 154 - #endif 155 154 } 156 155 157 - static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) 156 + void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) 158 157 { 159 - #ifdef CONFIG_DEBUG_FS 160 158 do_gettimeofday(&nst->st_sock_time); 161 - #endif 162 159 } 163 160 164 - static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) 161 + void o2net_set_nst_send_time(struct o2net_send_tracking *nst) 165 162 { 166 - #ifdef CONFIG_DEBUG_FS 167 163 do_gettimeofday(&nst->st_send_time); 168 - #endif 169 164 } 170 165 171 - static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) 166 + void o2net_set_nst_status_time(struct o2net_send_tracking *nst) 172 167 { 173 - #ifdef CONFIG_DEBUG_FS 174 168 do_gettimeofday(&nst->st_status_time); 175 - #endif 176 169 } 177 170 178 - static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, 171 + void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, 179 172 struct o2net_sock_container *sc) 180 173 { 181 - #ifdef CONFIG_DEBUG_FS 182 174 nst->st_sc = sc; 183 - #endif 184 175 } 185 176 186 - static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) 177 + void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) 187 178 { 188 - #ifdef CONFIG_DEBUG_FS 189 179 nst->st_id = msg_id; 190 - #endif 191 180 } 181 + #endif /* CONFIG_DEBUG_FS */ 192 182 193 183 static inline int o2net_reconnect_delay(void) 194 184 {
+6 -6
fs/ocfs2/cluster/tcp.h
··· 128 128 void o2net_debug_add_sc(struct o2net_sock_container *sc); 129 129 void o2net_debug_del_sc(struct o2net_sock_container *sc); 130 130 #else 131 - static int o2net_debugfs_init(void) 131 + static inline int o2net_debugfs_init(void) 132 132 { 133 133 return 0; 134 134 } 135 - static void o2net_debugfs_exit(void) 135 + static inline void o2net_debugfs_exit(void) 136 136 { 137 137 } 138 - static void o2net_debug_add_nst(struct o2net_send_tracking *nst) 138 + static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst) 139 139 { 140 140 } 141 - static void o2net_debug_del_nst(struct o2net_send_tracking *nst) 141 + static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst) 142 142 { 143 143 } 144 - static void o2net_debug_add_sc(struct o2net_sock_container *sc) 144 + static inline void o2net_debug_add_sc(struct o2net_sock_container *sc) 145 145 { 146 146 } 147 - static void o2net_debug_del_sc(struct o2net_sock_container *sc) 147 + static inline void o2net_debug_del_sc(struct o2net_sock_container *sc) 148 148 { 149 149 } 150 150 #endif /* CONFIG_DEBUG_FS */
+32
fs/ocfs2/cluster/tcp_internal.h
··· 224 224 struct timeval st_send_time; 225 225 struct timeval st_status_time; 226 226 }; 227 + 228 + void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, 229 + u32 msgkey, struct task_struct *task, u8 node); 230 + void o2net_set_nst_sock_time(struct o2net_send_tracking *nst); 231 + void o2net_set_nst_send_time(struct o2net_send_tracking *nst); 232 + void o2net_set_nst_status_time(struct o2net_send_tracking *nst); 233 + void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, 234 + struct o2net_sock_container *sc); 235 + void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id); 236 + 227 237 #else 228 238 struct o2net_send_tracking { 229 239 u32 dummy; 230 240 }; 241 + 242 + static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, 243 + u32 msgkey, struct task_struct *task, u8 node) 244 + { 245 + } 246 + static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) 247 + { 248 + } 249 + static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) 250 + { 251 + } 252 + static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) 253 + { 254 + } 255 + static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, 256 + struct o2net_sock_container *sc) 257 + { 258 + } 259 + static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, 260 + u32 msg_id) 261 + { 262 + } 231 263 #endif /* CONFIG_DEBUG_FS */ 232 264 233 265 #endif /* O2CLUSTER_TCP_INTERNAL_H */
+11 -11
fs/ocfs2/dlm/dlmdebug.h
··· 60 60 61 61 #else 62 62 63 - static int dlm_debug_init(struct dlm_ctxt *dlm) 63 + static inline int dlm_debug_init(struct dlm_ctxt *dlm) 64 64 { 65 65 return 0; 66 66 } 67 - static void dlm_debug_shutdown(struct dlm_ctxt *dlm) 67 + static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm) 68 68 { 69 69 } 70 - static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) 71 - { 72 - return 0; 73 - } 74 - static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) 75 - { 76 - } 77 - static int dlm_create_debugfs_root(void) 70 + static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) 78 71 { 79 72 return 0; 80 73 } 81 - static void dlm_destroy_debugfs_root(void) 74 + static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) 75 + { 76 + } 77 + static inline int dlm_create_debugfs_root(void) 78 + { 79 + return 0; 80 + } 81 + static inline void dlm_destroy_debugfs_root(void) 82 82 { 83 83 } 84 84
+17 -17
fs/ocfs2/stack_user.c
··· 61 61 * negotiated by the client. The client negotiates based on the maximum 62 62 * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major 63 63 * number from the "SETV" message must match 64 - * user_stack.sp_proto->lp_max_version.pv_major, and the minor number 64 + * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number 65 65 * must be less than or equal to ...->lp_max_version.pv_minor. 66 66 * 67 67 * Once this information has been set, mounts will be allowed. From this ··· 153 153 struct ocfs2_control_message_down u_down; 154 154 }; 155 155 156 - static struct ocfs2_stack_plugin user_stack; 156 + static struct ocfs2_stack_plugin ocfs2_user_plugin; 157 157 158 158 static atomic_t ocfs2_control_opened; 159 159 static int ocfs2_control_this_node = -1; ··· 399 399 char *ptr = NULL; 400 400 struct ocfs2_control_private *p = file->private_data; 401 401 struct ocfs2_protocol_version *max = 402 - &user_stack.sp_proto->lp_max_version; 402 + &ocfs2_user_plugin.sp_proto->lp_max_version; 403 403 404 404 if (ocfs2_control_get_handshake_state(file) != 405 405 OCFS2_CONTROL_HANDSHAKE_PROTOCOL) ··· 680 680 struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); 681 681 int status = lksb->sb_status; 682 682 683 - BUG_ON(user_stack.sp_proto == NULL); 683 + BUG_ON(ocfs2_user_plugin.sp_proto == NULL); 684 684 685 685 /* 686 686 * For now we're punting on the issue of other non-standard errors ··· 693 693 */ 694 694 695 695 if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) 696 - user_stack.sp_proto->lp_unlock_ast(astarg, 0); 696 + ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); 697 697 else 698 - user_stack.sp_proto->lp_lock_ast(astarg); 698 + ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); 699 699 } 700 700 701 701 static void fsdlm_blocking_ast_wrapper(void *astarg, int level) 702 702 { 703 - BUG_ON(user_stack.sp_proto == NULL); 703 + BUG_ON(ocfs2_user_plugin.sp_proto == NULL); 704 704 705 - user_stack.sp_proto->lp_blocking_ast(astarg, level); 705 + ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); 706 706 } 707 707 708 708 static int user_dlm_lock(struct ocfs2_cluster_connection *conn, ··· 838 838 return 0; 839 839 } 840 840 841 - static struct ocfs2_stack_operations user_stack_ops = { 841 + static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { 842 842 .connect = user_cluster_connect, 843 843 .disconnect = user_cluster_disconnect, 844 844 .this_node = user_cluster_this_node, ··· 849 849 .dump_lksb = user_dlm_dump_lksb, 850 850 }; 851 851 852 - static struct ocfs2_stack_plugin user_stack = { 852 + static struct ocfs2_stack_plugin ocfs2_user_plugin = { 853 853 .sp_name = "user", 854 - .sp_ops = &user_stack_ops, 854 + .sp_ops = &ocfs2_user_plugin_ops, 855 855 .sp_owner = THIS_MODULE, 856 856 }; 857 857 858 858 859 - static int __init user_stack_init(void) 859 + static int __init ocfs2_user_plugin_init(void) 860 860 { 861 861 int rc; 862 862 863 863 rc = ocfs2_control_init(); 864 864 if (!rc) { 865 - rc = ocfs2_stack_glue_register(&user_stack); 865 + rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); 866 866 if (rc) 867 867 ocfs2_control_exit(); 868 868 } ··· 870 870 return rc; 871 871 } 872 872 873 - static void __exit user_stack_exit(void) 873 + static void __exit ocfs2_user_plugin_exit(void) 874 874 { 875 - ocfs2_stack_glue_unregister(&user_stack); 875 + ocfs2_stack_glue_unregister(&ocfs2_user_plugin); 876 876 ocfs2_control_exit(); 877 877 } 878 878 879 879 MODULE_AUTHOR("Oracle"); 880 880 MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); 881 881 MODULE_LICENSE("GPL"); 882 - module_init(user_stack_init); 883 - module_exit(user_stack_exit); 882 + module_init(ocfs2_user_plugin_init); 883 + module_exit(ocfs2_user_plugin_exit);