Skip to content

Commit

Permalink
percpu-refcount: Add EXPORT_SYMBOL to use percpu_ref from modules
Browse files Browse the repository at this point in the history
This patch adds EXPORT_SYMBOL() for percpu_ref_init(),
percpu_ref_cancel_init() and percpu_ref_kill_and_confirm() so
that percpu refcounting can be used by external modules.

Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Nov 7, 2013
1 parent dbcbc95 commit c9e8d12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/percpu-refcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release)
ref->release = release;
return 0;
}
EXPORT_SYMBOL(percpu_ref_init);

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

static void percpu_ref_kill_rcu(struct rcu_head *rcu)
{
Expand Down Expand Up @@ -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(percpu_ref_kill_and_confirm);

0 comments on commit c9e8d12

Please sign in to comment.