]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: smbdirect: introduce smbdirect_socket_prepare_create()
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Aug 2025 13:01:28 +0000 (15:01 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:18 +0000 (21:58 -0500)
This will be used by client and server until we reach
the point where we have only public function from
an smbdirect.ko.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: 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>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/common/smbdirect/smbdirect_socket.c

index 0a96f5db6ff377d707f4131ef55844c8202d6e54..421a5c2c705eb2594b6b62111314ce88921dca45 100644 (file)
@@ -5,3 +5,22 @@
  */
 
 #include "smbdirect_internal.h"
+
+__maybe_unused /* this is temporary while this file is included in others */
+static void smbdirect_socket_prepare_create(struct smbdirect_socket *sc,
+                                           const struct smbdirect_socket_parameters *sp,
+                                           struct workqueue_struct *workqueue)
+{
+       smbdirect_socket_init(sc);
+
+       /*
+        * Make a copy of the callers parameters
+        * from here we only work on the copy
+        */
+       sc->parameters = *sp;
+
+       /*
+        * Remember the callers workqueue
+        */
+       sc->workqueue = workqueue;
+}