Whamcloud - gitweb
LU-4423 lustre: don't declare extern variables in C files. 94/35294/3
authorNeilBrown <neilb@suse.com>
Sun, 23 Jun 2019 13:34:50 +0000 (09:34 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jul 2019 03:16:23 +0000 (03:16 +0000)
'extern' declarations should only appear in .h files.
All these names are declared in .h files as needed,
and these duplicate declarations in .c files can
be removed.

Test-Parameters: trivial

Change-Id: Ic563789f350fd21fd033f1d3c49cdac2125b86c5
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/35294
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_pool.c
lustre/ldlm/ldlm_resource.c
lustre/ptlrpc/import.c
lustre/ptlrpc/nrs_tbf.c
lustre/ptlrpc/ptlrpc_module.c

index da90fb1..12ffa08 100644 (file)
@@ -136,8 +136,6 @@ const char *ldlm_it2str(enum ldlm_intent_flags it)
 }
 EXPORT_SYMBOL(ldlm_it2str);
 
-extern struct kmem_cache *ldlm_lock_slab;
-
 #ifdef HAVE_SERVER_SUPPORT
 static ldlm_processing_policy ldlm_processing_policy_table[] = {
        [LDLM_PLAIN]    = ldlm_process_plain_lock,
index 9d47ac6..3c518aa 100644 (file)
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
        return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;
index ded251a..6d28079 100644 (file)
@@ -1035,8 +1035,6 @@ out_ref:
 }
 EXPORT_SYMBOL(ldlm_namespace_new);
 
-extern struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock);
-
 /**
  * Cancel and destroy all locks on a resource.
  *
index b8b9951..119d04c 100644 (file)
@@ -1794,7 +1794,6 @@ void ptlrpc_cleanup_imp(struct obd_import *imp)
 }
 
 /* Adaptive Timeout utils */
-extern unsigned int at_min, at_max, at_history;
 
 /* Update at_current with the specified value (bounded by at_min and at_max),
  * as well as the AT history "bins".
index 5ab39e1..371c784 100644 (file)
@@ -3583,7 +3583,6 @@ nrs_tbf_type_flag(struct ptlrpc_service *svc, enum ptlrpc_nrs_queue_type queue)
        return type;
 }
 
-extern struct nrs_core nrs_core;
 #define LPROCFS_WR_NRS_TBF_MAX_CMD (4096)
 static ssize_t
 ptlrpc_lprocfs_nrs_tbf_rule_seq_write(struct file *file,
index b11c07d..cd73db8 100644 (file)
 
 #include "ptlrpc_internal.h"
 
-extern spinlock_t ptlrpc_last_xid_lock;
-#if RS_DEBUG
-extern spinlock_t ptlrpc_rs_debug_lock;
-#endif
-
 static __init int ptlrpc_init(void)
 {
        int rc;