]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: client: only use public smbdirect functions
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Oct 2025 20:29:48 +0000 (21:29 +0100)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:22 +0000 (21:58 -0500)
Also remove a lot of unused includes...

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/client/smb2pdu.c
fs/smb/client/smbdirect.c
fs/smb/client/smbdirect.h

index 0aeb23aed8eb7d6918b17319ad3cd7d1f61f5904..957aca2222b51f003c4dd2ce0cdcb1fb52103067 100644 (file)
@@ -36,7 +36,6 @@
 #include "../common/smb2status.h"
 #include "smb2glob.h"
 #include "cifs_spnego.h"
-#include "../common/smbdirect/smbdirect.h"
 #include "smbdirect.h"
 #include "trace.h"
 #ifdef CONFIG_CIFS_DFS_UPCALL
index e51a91b07e9415b425baec2e84c31fced8e647f5..f0b3eebc8279dd9434377c46cf50b171f50e4b79 100644 (file)
@@ -7,13 +7,11 @@
 
 #define SMBDIRECT_USE_INLINE_C_FILES 1
 
-#include <linux/module.h>
-#include <linux/highmem.h>
-#include <linux/folio_queue.h>
 #include "smbdirect.h"
 #include "cifs_debug.h"
 #include "cifsproto.h"
 #include "smb2proto.h"
+#include "../common/smbdirect/smbdirect_public.h"
 
 /* Port numbers for SMBD transport */
 #define SMB_PORT       445
@@ -109,14 +107,6 @@ module_param(smbd_logging_level, uint, 0644);
 MODULE_PARM_DESC(smbd_logging_level,
        "Logging level for SMBD transport, 0 (default): error, 1: info");
 
-/*
- * This is a temporary solution until all code
- * is moved to smbdirect_all_c_files.c and we
- * have an smbdirect.ko that exports the required
- * functions.
- */
-#include "../common/smbdirect/smbdirect_all_c_files.c"
-
 static bool smbd_logging_needed(struct smbdirect_socket *sc,
                                void *private_ptr,
                                unsigned int lvl,
@@ -582,3 +572,11 @@ void smbd_debug_proc_show(struct TCP_Server_Info *server, struct seq_file *m)
                                                    server->rdma_readwrite_threshold,
                                                    m);
 }
+
+/*
+ * This is a temporary solution until all code
+ * is moved to smbdirect_all_c_files.c and we
+ * have an smbdirect.ko that exports the required
+ * functions.
+ */
+#include "../common/smbdirect/smbdirect_all_c_files.c"
index 35172076f2ee8721beb4559dc45863ebe825842a..bd03ae72e9c82e20e85b81e2acc5cf16bcdf9cfa 100644 (file)
 #define cifs_rdma_enabled(server)      ((server)->rdma)
 
 #include "cifsglob.h"
-#include <rdma/ib_verbs.h>
-#include <rdma/rdma_cm.h>
-#include <linux/mempool.h>
 
 #include "../common/smbdirect/smbdirect.h"
-#include "../common/smbdirect/smbdirect_socket.h"
 
 extern int rdma_readwrite_threshold;
 extern int smbd_max_frmr_depth;
@@ -27,15 +23,6 @@ extern int smbd_max_send_size;
 extern int smbd_send_credit_target;
 extern int smbd_receive_credit_max;
 
-/*
- * The context for the SMBDirect transport
- * Everything related to the transport is here. It has several logical parts
- * 1. RDMA related structures
- * 2. SMBDirect connection parameters
- * 3. Memory registrations
- * 4. Receive and reassembly queues for data receive path
- * 5. mempools for allocating packets
- */
 struct smbd_connection {
        struct smbdirect_socket *socket;
        struct workqueue_struct *workqueue;