smb/server: replace deprecated system workqueues
Subsystems (2)
PATCH 1/1 smb/server: replace deprecated system workqueues
From: ZhangGuoDong <[email protected]>
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 <[email protected]>
Reviewed-by ChenXiaoSong <[email protected]>
--- 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(-)
fs/smb/server/oplock.c +2 -2
@@ -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);
fs/smb/server/transport_tcp.c +3 -3
@@ -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;
fs/smb/server/vfs_cache.c +2 -2
@@ -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);
Signature · 1 line
2.55.0
Quoted 5 lines · ZhangGuoDong
From: ZhangGuoDong <[email protected]>
Queueing the lease break timer on
system_wqtriggers the following warning:
Quoted 7 lines
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 <[email protected]>Reviewed-by ChenXiaoSong <[email protected]>
Applied it to #ksmbd-for-next.
Thanks!