Skip to content

Commit 1b2d94a

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: only use public smbdirect functions
Also remove a lot of unused includes... Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.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>
1 parent ff7673f commit 1b2d94a

3 files changed

Lines changed: 11 additions & 17 deletions

File tree

fs/smb/server/smb2pdu.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "asn1.h"
2525
#include "connection.h"
2626
#include "transport_ipc.h"
27-
#include "../common/smbdirect/smbdirect.h"
2827
#include "transport_rdma.h"
2928
#include "vfs.h"
3029
#include "vfs_cache.h"

fs/smb/server/transport_rdma.c

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,15 @@
1313

1414
#include <linux/kthread.h>
1515
#include <linux/list.h>
16-
#include <linux/mempool.h>
17-
#include <linux/highmem.h>
18-
#include <linux/scatterlist.h>
1916
#include <linux/string_choices.h>
20-
#include <rdma/ib_verbs.h>
21-
#include <rdma/rdma_cm.h>
22-
#include <rdma/rw.h>
2317

2418
#include "glob.h"
2519
#include "connection.h"
2620
#include "smb_common.h"
2721
#include "../common/smb2status.h"
28-
#include "../common/smbdirect/smbdirect.h"
29-
#include "../common/smbdirect/smbdirect_pdu.h"
30-
#include "../common/smbdirect/smbdirect_socket.h"
3122
#include "transport_rdma.h"
23+
#include "../common/smbdirect/smbdirect_public.h"
3224

33-
/*
34-
* This is a temporary solution until all code
35-
* is moved to smbdirect_all_c_files.c and we
36-
* have an smbdirect.ko that exports the required
37-
* functions.
38-
*/
39-
#include "../common/smbdirect/smbdirect_all_c_files.c"
4025

4126
#define SMB_DIRECT_PORT_IWARP 5445
4227
#define SMB_DIRECT_PORT_INFINIBAND 445
@@ -709,3 +694,11 @@ static const struct ksmbd_transport_ops ksmbd_smb_direct_transport_ops = {
709694
.rdma_write = smb_direct_rdma_write,
710695
.free_transport = smb_direct_free_transport,
711696
};
697+
698+
/*
699+
* This is a temporary solution until all code
700+
* is moved to smbdirect_all_c_files.c and we
701+
* have an smbdirect.ko that exports the required
702+
* functions.
703+
*/
704+
#include "../common/smbdirect/smbdirect_all_c_files.c"

fs/smb/server/transport_rdma.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ static inline void init_smbd_max_io_size(unsigned int sz) { }
2727
static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }
2828
#endif
2929

30+
#include "../common/smbdirect/smbdirect.h"
31+
3032
#endif /* __KSMBD_TRANSPORT_RDMA_H__ */

0 commit comments

Comments
 (0)