Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

smb: smbdirect: introduce smbdirect_socket.connect.{lock,work}

This will first be used by the server in order to defer
the processing of the initial recv of the negotiation
request.

But in future it will also be used by the client in order
to implement an async connect.

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

authored by

Stefan Metzmacher and committed by
Steve French
49ca2147 8f0b4cce

+12
+12
fs/smb/common/smbdirect/smbdirect_socket.h
··· 133 133 struct smbdirect_socket_parameters parameters; 134 134 135 135 /* 136 + * The state for connect/negotiation 137 + */ 138 + struct { 139 + spinlock_t lock; 140 + struct work_struct work; 141 + } connect; 142 + 143 + /* 136 144 * The state for keepalive and timeout handling 137 145 */ 138 146 struct { ··· 360 352 361 353 INIT_WORK(&sc->disconnect_work, __smbdirect_socket_disabled_work); 362 354 disable_work_sync(&sc->disconnect_work); 355 + 356 + spin_lock_init(&sc->connect.lock); 357 + INIT_WORK(&sc->connect.work, __smbdirect_socket_disabled_work); 358 + disable_work_sync(&sc->connect.work); 363 359 364 360 INIT_WORK(&sc->idle.immediate_work, __smbdirect_socket_disabled_work); 365 361 disable_work_sync(&sc->idle.immediate_work);