Skip to content

Commit b08484d

Browse files
metze-sambasmfrench
authored andcommitted
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 <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent e2e8751 commit b08484d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)
389389
}
390390

391391
if (smb2_command != SMB2_INTERNAL_CMD)
392-
queue_delayed_work(cifsiod_wq, &server->reconnect, 0);
392+
mod_delayed_work(cifsiod_wq, &server->reconnect, 0);
393393

394394
atomic_inc(&tconInfoReconnectCount);
395395
out:
@@ -3570,7 +3570,7 @@ SMB2_echo(struct TCP_Server_Info *server)
35703570

35713571
if (server->tcpStatus == CifsNeedNegotiate) {
35723572
/* No need to send echo on newly established connections */
3573-
queue_delayed_work(cifsiod_wq, &server->reconnect, 0);
3573+
mod_delayed_work(cifsiod_wq, &server->reconnect, 0);
35743574
return rc;
35753575
}
35763576

0 commit comments

Comments
 (0)