Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: ZhangGuoDong <zhang.guodong@linux.dev>
To: linkinjeon@kernel.org, pc@manguebit.org
Cc: linux-cifs@vger.kernel.org,
	ZhangGuoDong <zhangguodong@kylinos.cn>,
	ChenXiaoSong <chenxiaosong@kylinos.cn>
Subject: [PATCH] smb/server: replace deprecated system workqueues
Date: Wed, 21 Oct 2026 15:02:57 +0800	[thread overview]
Message-ID: <20261021070257.127209-1-zhang.guodong@linux.dev> (raw)

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


             reply	other threads:[~2026-10-21  7:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  7:02 ZhangGuoDong [this message]
2026-10-21  8:30 ` [PATCH] smb/server: replace deprecated system workqueues 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=20261021070257.127209-1-zhang.guodong@linux.dev \
    --to=zhang.guodong@linux.dev \
    --cc=chenxiaosong@kylinos.cn \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=zhangguodong@kylinos.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox