2013-10-14 09:28:33

by Matias Bjørling

[permalink] [raw]
Subject: [PATCH v2] Export percpu-refcount functions

ERROR: "percpu_ref_kill_and_confirm" [...] undefined!

Working on a driver that needs them, but other modules might benefit as well.

The second version changes export symbols to GPL per Paul and Tejun's
suggestion.

(https://lkml.org/lkml/2013/10/11/370)

Kent, will you replace the previous patch with the updated. Sorry for the
inconvenience.

Changes in v2:
[1/1] Uses EXPORT_SYMBOL_GPL

Matias Bjorling (1):
percpu-refcount: Export symbols

lib/percpu-refcount.c | 3 +++
1 file changed, 3 insertions(+)

--
1.8.1.2


2013-10-14 09:28:47

by Matias Bjørling

[permalink] [raw]
Subject: [PATCH] percpu_refcount: Export symbols

Export the interface to be used within modules.

Signed-off-by: Matias Bjorling <[email protected]>
---
lib/percpu-refcount.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c
index 7deeb62..1a53d49 100644
--- a/lib/percpu-refcount.c
+++ b/lib/percpu-refcount.c
@@ -53,6 +53,7 @@ int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release)
ref->release = release;
return 0;
}
+EXPORT_SYMBOL_GPL(percpu_ref_init);

/**
* percpu_ref_cancel_init - cancel percpu_ref_init()
@@ -84,6 +85,7 @@ void percpu_ref_cancel_init(struct percpu_ref *ref)
free_percpu(ref->pcpu_count);
}
}
+EXPORT_SYMBOL_GPL(percpu_ref_cancel_init);

static void percpu_ref_kill_rcu(struct rcu_head *rcu)
{
@@ -156,3 +158,4 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref,

call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu);
}
+EXPORT_SYMBOL_GPL(percpu_ref_kill_and_confirm);
--
1.8.1.2

2013-10-14 13:35:32

by Tejun Heo

[permalink] [raw]
Subject: Re: [PATCH] percpu_refcount: Export symbols

(cc'ing Andrew)

On Mon, Oct 14, 2013 at 10:55:32AM +0200, Matias Bjorling wrote:
> Export the interface to be used within modules.
>
> Signed-off-by: Matias Bjorling <[email protected]>

Acked-by: Tejun Heo <[email protected]>

Andrew, I don't have any percpu changes queued or scheduled for the
next merge window and I think it'd be easier if you can pick up this
one. The original patch is at

http://article.gmane.org/gmane.linux.kernel/1578435/raw

Thanks a lot!

--
tejun