From: Stefan Metzmacher Date: Tue, 26 Aug 2025 13:01:28 +0000 (+0200) Subject: smb: smbdirect: introduce smbdirect_socket_prepare_create() X-Git-Tag: v7.1-rc1~128^2~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df76b456280ba2c467907b9f25e1ddc8aea773f1;p=thirdparty%2Fkernel%2Flinux.git smb: smbdirect: introduce smbdirect_socket_prepare_create() 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 Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Acked-by: Namjae Jeon Signed-off-by: Steve French --- diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c index 0a96f5db6ff37..421a5c2c705eb 100644 --- a/fs/smb/common/smbdirect/smbdirect_socket.c +++ b/fs/smb/common/smbdirect/smbdirect_socket.c @@ -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; +}