All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huiwen He <huiwen.he@linux.dev>
To: linkinjeon@kernel.org
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com, tj@kernel.org,
	jiangshanlai@gmail.com, stefan.chulski@broadcom.com
Subject: [PATCH 3/4] workqueue: export attribute and sysfs setup helpers
Date: Tue,  1 Dec 2026 11:27:47 +0800	[thread overview]
Message-ID: <20261201032749.2224354-4-huiwen.he@linux.dev> (raw)
In-Reply-To: <20261201032749.2224354-1-huiwen.he@linux.dev>

From: Huiwen He <hehuiwen@kylinos.cn>

The workqueue attribute helpers are not available to modules.

Export the allocation, application and release helpers for GPL modules.
Also export workqueue_sysfs_register() so a module can apply attributes
before exposing its queue in sysfs.

Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
---
 kernel/workqueue.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a2a441837a9d..f525618afdb5 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5012,6 +5012,7 @@ void free_workqueue_attrs(struct workqueue_attrs *attrs)
 		kfree(attrs);
 	}
 }
+EXPORT_SYMBOL_GPL(free_workqueue_attrs);
 
 /**
  * alloc_workqueue_attrs - allocate a workqueue_attrs
@@ -5040,6 +5041,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)
@@ -5878,6 +5880,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
@@ -8001,6 +8004,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
 	kobject_uevent(&wq_dev->dev.kobj, KOBJ_ADD);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(workqueue_sysfs_register);
 
 /**
  * workqueue_sysfs_unregister - undo workqueue_sysfs_register()

  parent reply	other threads:[~2026-12-01  3:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  3:27 [PATCH 0/4] ksmbd: allow request dispatch on an unbound workqueue Huiwen He
2026-12-01  3:27 ` [PATCH 1/4] ksmbd: keep server in RESETTING until defaults are restored Huiwen He
2026-12-01  3:27 ` [PATCH 2/4] ksmbd: reset the server directly on startup failure Huiwen He
2026-12-01  3:27 ` Huiwen He [this message]
2026-12-01  6:47   ` [PATCH 3/4] workqueue: export attribute and sysfs setup helpers ChenXiaoSong
2026-12-01  3:27 ` [PATCH 4/4] ksmbd: add request workqueue mode startup option Huiwen He
2026-12-01  6:51 ` [PATCH 0/4] ksmbd: allow request dispatch on an unbound workqueue ChenXiaoSong
2026-12-01 15:02 ` Ian Bridges
2026-12-01 22:44 ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201032749.2224354-4-huiwen.he@linux.dev \
    --to=huiwen.he@linux.dev \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=stefan.chulski@broadcom.com \
    --cc=tj@kernel.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.