diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-02-24 14:14:59 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-03-23 04:49:09 +0100 |
commit | b08484d715128abf28b8445e85c5adb14af0a62e (patch) | |
tree | 7d521162a267aeb58ab8a9209ce3a8c395113c9c /fs/cifs/smb2pdu.c | |
parent | cifs: call wake_up(&server->response_q) inside of cifs_reconnect() (diff) | |
download | linux-b08484d715128abf28b8445e85c5adb14af0a62e.tar.xz linux-b08484d715128abf28b8445e85c5adb14af0a62e.zip |
cifs: use mod_delayed_work() for &server->reconnect if already queued
mod_delayed_work() is safer than queue_delayed_work() if there's a
chance that the work is already in the queue.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 8c23c10cafd2..0f4cc8606cbc 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -389,7 +389,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon) } if (smb2_command != SMB2_INTERNAL_CMD) - queue_delayed_work(cifsiod_wq, &server->reconnect, 0); + mod_delayed_work(cifsiod_wq, &server->reconnect, 0); atomic_inc(&tconInfoReconnectCount); out: @@ -3570,7 +3570,7 @@ SMB2_echo(struct TCP_Server_Info *server) if (server->tcpStatus == CifsNeedNegotiate) { /* No need to send echo on newly established connections */ - queue_delayed_work(cifsiod_wq, &server->reconnect, 0); + mod_delayed_work(cifsiod_wq, &server->reconnect, 0); return rc; } |