All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] [PATCH] staging: lustre: ldlm: Fix extern variable declaration
@ 2016-09-24  1:11 Imre Deak
  0 siblings, 0 replies; only message in thread
From: Imre Deak @ 2016-09-24  1:11 UTC (permalink / raw)
  To: lustre-devel

From: Imre Deak <imre.deak@gmail.com>

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>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 1 +
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c    | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
index 6536832..5e82cfc 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
@@ -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);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index ff2c28e..fde697e 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -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)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-24  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-24  1:11 [lustre-devel] [PATCH] staging: lustre: ldlm: Fix extern variable declaration Imre Deak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.