[PATCH RFC 5/8] workqueue: Export the functions needed for WQ attribute modification

From: Chuck Lever

Date: Mon Aug 31 2026 - 15:06:42 EST


Modules that create unbound workqueues currently have no way
to modify workqueue attributes at run time. Export the
allocation, application, and teardown functions so that
modules such as sunrpc can adjust affinity scope without
reloading.

Signed-off-by: Chuck Lever <cel@xxxxxxxxxx>
---
kernel/workqueue.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 3c034cbc5bb3..fd76a875cf2d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4813,6 +4813,7 @@ void free_workqueue_attrs(struct workqueue_attrs *attrs)
kfree(attrs);
}
}
+EXPORT_SYMBOL_GPL(free_workqueue_attrs);

/**
* alloc_workqueue_attrs - allocate a workqueue_attrs
@@ -4841,6 +4842,7 @@ struct workqueue_attrs *alloc_workqueue_attrs_noprof(void)
free_workqueue_attrs(attrs);
return NULL;
}
+EXPORT_SYMBOL_GPL(alloc_workqueue_attrs_noprof);

static void copy_workqueue_attrs(struct workqueue_attrs *to,
const struct workqueue_attrs *from)
@@ -5609,6 +5611,7 @@ int apply_workqueue_attrs(struct workqueue_struct *wq,

return ret;
}
+EXPORT_SYMBOL_GPL(apply_workqueue_attrs);

/**
* unbound_wq_update_pwq - update a pwq slot for CPU hot[un]plug

--
2.55.0