* [PATCH] smb/server: replace deprecated system workqueues
@ 2026-10-21 7:02 ZhangGuoDong
2026-10-21 8:30 ` Namjae Jeon
0 siblings, 1 reply; 2+ messages in thread
From: ZhangGuoDong @ 2026-10-21 7:02 UTC (permalink / raw)
To: linkinjeon, pc; +Cc: linux-cifs, ZhangGuoDong, ChenXiaoSong
From: ZhangGuoDong <zhangguodong@kylinos.cn>
Queueing the lease break timer on system_wq triggers the following warning:
workqueue: work func lease_break_timer [ksmbd] enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead.
The oplock break timer and TCP transmit work also use deprecated system
queues.
Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
---
fs/smb/server/oplock.c | 4 ++--
fs/smb/server/transport_tcp.c | 6 +++---
fs/smb/server/vfs_cache.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c
index e76dfc904fb9..d479508c06c5 100644
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -178,7 +178,7 @@ static void lease_break_timer(struct work_struct *work)
lease_break_timer_pending = pending;
if (pending) {
lease_break_timer_next = next;
- mod_delayed_work(system_wq, &lease_break_timer_work,
+ mod_delayed_work(system_percpu_wq, &lease_break_timer_work,
time_after_eq(jiffies, next) ? 0 : next - jiffies);
}
mutex_unlock(&lease_break_timer_lock);
@@ -191,7 +191,7 @@ static void schedule_lease_break_timer(unsigned long timeout)
time_before(timeout, lease_break_timer_next)) {
lease_break_timer_pending = true;
lease_break_timer_next = timeout;
- mod_delayed_work(system_wq, &lease_break_timer_work,
+ mod_delayed_work(system_percpu_wq, &lease_break_timer_work,
time_after_eq(jiffies, timeout) ? 0 : timeout - jiffies);
}
mutex_unlock(&lease_break_timer_lock);
diff --git a/fs/smb/server/transport_tcp.c b/fs/smb/server/transport_tcp.c
index 9c6ca878d30f..937d321fa364 100644
--- a/fs/smb/server/transport_tcp.c
+++ b/fs/smb/server/transport_tcp.c
@@ -573,7 +573,7 @@ static void ksmbd_tcp_tx_work(struct work_struct *work)
if (READ_ONCE(t->tx_stopped))
ksmbd_tcp_purge_tx(t);
else if (!list_empty(&t->tx_queue))
- queue_delayed_work(system_unbound_wq, &t->tx_work, delay);
+ queue_delayed_work(system_dfl_wq, &t->tx_work, delay);
mutex_unlock(&t->tx_lock);
wake_up_all(&t->transport.conn->req_running_q);
@@ -590,7 +590,7 @@ static void ksmbd_tcp_write_space(struct sock *sk)
if (t) {
t->write_space(sk);
if (!READ_ONCE(t->tx_stopped) && sk_stream_is_writeable(sk))
- mod_delayed_work(system_unbound_wq, &t->tx_work, 0);
+ mod_delayed_work(system_dfl_wq, &t->tx_work, 0);
}
read_unlock_bh(&sk->sk_callback_lock);
}
@@ -687,7 +687,7 @@ static int ksmbd_tcp_writev(struct ksmbd_transport *t,
msg->deadline = deadline;
list_add_tail(&msg->list, &tt->tx_queue);
WRITE_ONCE(tt->tx_queued, tt->tx_queued + msg->len);
- queue_delayed_work(system_unbound_wq, &tt->tx_work, 0);
+ queue_delayed_work(system_dfl_wq, &tt->tx_work, 0);
accepted:
tt->tx_end += tx->size;
diff --git a/fs/smb/server/vfs_cache.c b/fs/smb/server/vfs_cache.c
index bfa28ef197f6..452ce05d1494 100644
--- a/fs/smb/server/vfs_cache.c
+++ b/fs/smb/server/vfs_cache.c
@@ -87,7 +87,7 @@ static void ksmbd_oplock_break_timer(struct work_struct *work)
oplock_break_timer_pending = pending;
if (pending) {
oplock_break_timer_next = next;
- mod_delayed_work(system_wq, &oplock_break_timer_work,
+ mod_delayed_work(system_percpu_wq, &oplock_break_timer_work,
time_after_eq(jiffies, next) ? 0 : next - jiffies);
}
mutex_unlock(&oplock_break_timer_lock);
@@ -100,7 +100,7 @@ void ksmbd_schedule_oplock_break_timer(unsigned long timeout)
time_before(timeout, oplock_break_timer_next)) {
oplock_break_timer_pending = true;
oplock_break_timer_next = timeout;
- mod_delayed_work(system_wq, &oplock_break_timer_work,
+ mod_delayed_work(system_percpu_wq, &oplock_break_timer_work,
time_after_eq(jiffies, timeout) ? 0 : timeout - jiffies);
}
mutex_unlock(&oplock_break_timer_lock);
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] smb/server: replace deprecated system workqueues
2026-10-21 7:02 [PATCH] smb/server: replace deprecated system workqueues ZhangGuoDong
@ 2026-10-21 8:30 ` Namjae Jeon
0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2026-10-21 8:30 UTC (permalink / raw)
To: ZhangGuoDong; +Cc: pc, linux-cifs, ZhangGuoDong, ChenXiaoSong
On Wed, Oct 21, 2026 at 4:03 PM ZhangGuoDong <zhang.guodong@linux.dev> wrote:
>
> From: ZhangGuoDong <zhangguodong@kylinos.cn>
>
> Queueing the lease break timer on system_wq triggers the following warning:
>
> workqueue: work func lease_break_timer [ksmbd] enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead.
>
> The oplock break timer and TCP transmit work also use deprecated system
> queues.
>
> Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn>
> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Applied it to #ksmbd-for-next.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-21 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 7:02 [PATCH] smb/server: replace deprecated system workqueues ZhangGuoDong
2026-10-21 8:30 ` Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox