staging: lustre: ldlm: Fix extern variable declaration
authorImre Deak <imre.deak@gmail.com>
Sat, 24 Sep 2016 01:11:37 +0000 (04:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Sep 2016 10:42:35 +0000 (12:42 +0200)
Move the extern declaration to a header file common to all users of the
variable. This fixes the following sparse warning:
symbol 'ldlm_cancel_unused_locks_before_replay' was not declared.
Should it be static?

Signed-off-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c

index 6536832a54d62611e8ca8126cf08dc440f5660db..5e82cfc245b2bb732c066e5623bf95cac5981673 100644 (file)
@@ -103,6 +103,7 @@ int ldlm_cancel_lru_local(struct ldlm_namespace *ns,
                          struct list_head *cancels, int count, int max,
                          enum ldlm_cancel_flags cancel_flags, int flags);
 extern unsigned int ldlm_enqueue_min;
+extern unsigned int ldlm_cancel_unused_locks_before_replay;
 
 /* ldlm_resource.c */
 int ldlm_resource_putref_locked(struct ldlm_resource *res);
index ff2c28ed4f1d3094e0be008a4e79670a5462bb8d..fde697ebaadc18167c935d1cf192941b1d98721f 100644 (file)
@@ -877,8 +877,6 @@ void ldlm_put_ref(void)
 }
 EXPORT_SYMBOL(ldlm_put_ref);
 
-extern unsigned int ldlm_cancel_unused_locks_before_replay;
-
 static ssize_t cancel_unused_locks_before_replay_show(struct kobject *kobj,
                                                      struct attribute *attr,
                                                      char *buf)