smb: smbdirect: let smbdirect_socket_init() initialize all [delayed_]work_structs...
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Aug 2025 14:30:32 +0000 (16:30 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:48 +0000 (18:29 -0500)
commit6920b4ad49fc7ff5b99a0dcff8e9612753a7a876
tree70ff8a78da93e3edd0acb820550ec4389a594196
parented3350f09d2c0234c59910ef1655cb9cbe17b0ca
smb: smbdirect: let smbdirect_socket_init() initialize all [delayed_]work_structs as disabled

This safer to start with and allows common code not care about if the
caller uses these or not. E.g. sc->mr_io.recovery_work is only used
on the client...

Note disable_[delayed_]work_sync() requires a valid function pointer
in INIT_[DELAYED_]WORK(). The non _sync() version don't require it,
but as we need to use the _sync() version on cleanup we better use
it here too, it won't block anyway here...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/common/smbdirect/smbdirect_socket.h