2020-10-19 09:52:52

by NeilBrown

[permalink] [raw]
Subject: [PATCH] workqueue: export apply_workqueue_attrs()


Lustre is a widely used cluster filesystem which is currently
out-of-tree, but work is underway to make it ready for upstream
submission.

Lustre needs apply_workqueue_attrs(), and for this reason that function
was exported in Commit 6106c0f82481 ("staging: lustre: lnet: convert
selftest to use workqueues").

Unfortuantely it was later (through an excess of caution) unexported by
Commit 2c9858ecbeb1 ("workqueue: Make alloc/apply/free_workqueue_attrs()
static"), which also marked the function static.

Subsequently in Commit 513c98d08682 ("workqueue: unconfine
alloc/apply/free_workqueue_attrs()") the "static" marking was removed
when it was realized that it is actually useful to some clients of
"workqueue", but it was not exported at this time.

Lustre has been making do with use of kallsyms_lookup_name() to get
access to this function when it isn't exported, but that loop-hole has
now been removed.

So: time to export the function again.

Signed-off-by: NeilBrown <[email protected]>
---
kernel/workqueue.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 437935e7a199..ab593b20fb94 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4068,6 +4068,7 @@ int apply_workqueue_attrs(struct workqueue_struct *wq,

return ret;
}
+EXPORT_SYMBOL_GPL(apply_workqueue_attrs);

/**
* wq_update_unbound_numa - update NUMA affinity of a wq for CPU hot[un]plug
--
2.28.0


Attachments:
signature.asc (869.00 B)

2020-10-23 15:35:30

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] workqueue: export apply_workqueue_attrs()

On Mon, Oct 19, 2020 at 10:52:09AM +1100, NeilBrown wrote:
>
> Lustre is a widely used cluster filesystem which is currently
> out-of-tree, but work is underway to make it ready for upstream
> submission.
>
> Lustre needs apply_workqueue_attrs(), and for this reason that function
> was exported in Commit 6106c0f82481 ("staging: lustre: lnet: convert
> selftest to use workqueues").

None of this matters. We don't export unused symbols, period.