From: Stefan Metzmacher Date: Mon, 27 Oct 2025 20:29:48 +0000 (+0100) Subject: smb: client: only use public smbdirect functions X-Git-Tag: v7.1-rc1~128^2~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8e98e392062a9575e41646621f238f3a35203ae;p=thirdparty%2Fkernel%2Flinux.git smb: client: only use public smbdirect functions Also remove a lot of unused includes... 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/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index 0aeb23aed8eb7..957aca2222b51 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -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 diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index e51a91b07e941..f0b3eebc8279d 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -7,13 +7,11 @@ #define SMBDIRECT_USE_INLINE_C_FILES 1 -#include -#include -#include #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" diff --git a/fs/smb/client/smbdirect.h b/fs/smb/client/smbdirect.h index 35172076f2ee8..bd03ae72e9c82 100644 --- a/fs/smb/client/smbdirect.h +++ b/fs/smb/client/smbdirect.h @@ -11,12 +11,8 @@ #define cifs_rdma_enabled(server) ((server)->rdma) #include "cifsglob.h" -#include -#include -#include #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;