]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: smbdirect: move fs/smb/common/smbdirect/ to fs/smb/smbdirect/
authorStefan Metzmacher <metze@samba.org>
Sun, 19 Apr 2026 19:20:18 +0000 (21:20 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Apr 2026 00:00:41 +0000 (19:00 -0500)
This also removes the smbdirect_ prefix from the files.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/linux-cifs/CAHk-=whmue3PVi88K0UZLZO0at22QhQZ-yu+qO2TOKyZpGqecw@mail.gmail.com/
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
28 files changed:
MAINTAINERS
fs/smb/Kconfig
fs/smb/Makefile
fs/smb/client/Kconfig
fs/smb/client/smbdirect.c
fs/smb/client/smbdirect.h
fs/smb/common/Makefile
fs/smb/common/smbdirect/Makefile [deleted file]
fs/smb/server/Kconfig
fs/smb/server/transport_rdma.c
fs/smb/server/transport_rdma.h
fs/smb/smbdirect/Kconfig [moved from fs/smb/common/smbdirect/Kconfig with 86% similarity]
fs/smb/smbdirect/Makefile [new file with mode: 0644]
fs/smb/smbdirect/accept.c [moved from fs/smb/common/smbdirect/smbdirect_accept.c with 99% similarity]
fs/smb/smbdirect/connect.c [moved from fs/smb/common/smbdirect/smbdirect_connect.c with 99% similarity]
fs/smb/smbdirect/connection.c [moved from fs/smb/common/smbdirect/smbdirect_connection.c with 99% similarity]
fs/smb/smbdirect/debug.c [moved from fs/smb/common/smbdirect/smbdirect_debug.c with 98% similarity]
fs/smb/smbdirect/devices.c [moved from fs/smb/common/smbdirect/smbdirect_devices.c with 99% similarity]
fs/smb/smbdirect/internal.h [moved from fs/smb/common/smbdirect/smbdirect_internal.h with 98% similarity]
fs/smb/smbdirect/listen.c [moved from fs/smb/common/smbdirect/smbdirect_listen.c with 99% similarity]
fs/smb/smbdirect/main.c [moved from fs/smb/common/smbdirect/smbdirect_main.c with 99% similarity]
fs/smb/smbdirect/mr.c [moved from fs/smb/common/smbdirect/smbdirect_mr.c with 99% similarity]
fs/smb/smbdirect/pdu.h [moved from fs/smb/common/smbdirect/smbdirect_pdu.h with 100% similarity]
fs/smb/smbdirect/public.h [moved from fs/smb/common/smbdirect/smbdirect_public.h with 100% similarity]
fs/smb/smbdirect/rw.c [moved from fs/smb/common/smbdirect/smbdirect_rw.c with 99% similarity]
fs/smb/smbdirect/smbdirect.h [moved from fs/smb/common/smbdirect/smbdirect.h with 100% similarity]
fs/smb/smbdirect/socket.c [moved from fs/smb/common/smbdirect/smbdirect_socket.c with 99% similarity]
fs/smb/smbdirect/socket.h [moved from fs/smb/common/smbdirect/smbdirect_socket.h with 100% similarity]

index 54b33d43e9fd0cc28b3f5dc7fcf959d856e5bcdf..839218627f5fdb29720417cac2e7a843198ae452 100644 (file)
@@ -24590,7 +24590,7 @@ L:      linux-cifs@vger.kernel.org
 L:     samba-technical@lists.samba.org (moderated for non-subscribers)
 S:     Maintained
 F:     fs/smb/client/smbdirect.*
-F:     fs/smb/common/smbdirect/
+F:     fs/smb/smbdirect/
 F:     fs/smb/server/transport_rdma.*
 
 SMC91x ETHERNET DRIVER
index b4b2cfdc2a6bffef25778fe0fa9d5a8c562c0996..e549e189ee6a7fc02ae21a462e7a13e9a12fba9f 100644 (file)
@@ -4,7 +4,7 @@
 
 source "fs/smb/client/Kconfig"
 source "fs/smb/server/Kconfig"
-source "fs/smb/common/smbdirect/Kconfig"
+source "fs/smb/smbdirect/Kconfig"
 
 config SMBFS
        tristate
index 9a1bf59a1a651d01426bb4edb7e71bfd199e04af..353b1c2eefc46ba57cabcffc7961e13e988d5878 100644 (file)
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_SMBFS)            += common/
+obj-$(CONFIG_SMBDIRECT)                += smbdirect/
 obj-$(CONFIG_CIFS)             += client/
 obj-$(CONFIG_SMB_SERVER)       += server/
index 63831242fddfb201e6e5dab518df2307671c618d..fed621910876b46682408eb3b565bd8786960bb4 100644 (file)
@@ -182,7 +182,7 @@ config CIFS_SMB_DIRECT
        bool "SMB Direct support"
        depends on CIFS && INFINIBAND && INFINIBAND_ADDR_TRANS
        depends on CIFS=m || INFINIBAND=y
-       select SMB_COMMON_SMBDIRECT
+       select SMBDIRECT
        help
          Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
          SMB Direct allows transferring SMB packets over RDMA. If unsure,
index 9e67adcdc7d3e6f4f93de37a5faa39eb207110bc..75f9f91a7ec968459c5934440d0139ca995ef71b 100644 (file)
@@ -9,7 +9,7 @@
 #include "cifs_debug.h"
 #include "cifsproto.h"
 #include "smb2proto.h"
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"
 
 /* Port numbers for SMBD transport */
 #define SMB_PORT       445
index 0017d5b2de449abf2a1d6409da9b122e2f502e16..287ac849213d400f761141573ee6e08799aa5979 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "cifsglob.h"
 
-#include "../common/smbdirect/smbdirect.h"
+#include "../smbdirect/smbdirect.h"
 
 extern int rdma_readwrite_threshold;
 extern int smbd_max_frmr_depth;
index e6ee65c31b5dc324c11c352fbc278d66672d8c7b..9e0730a385fb118fc3c44d139dba24e9fae19c45 100644 (file)
@@ -4,4 +4,3 @@
 #
 
 obj-$(CONFIG_SMBFS) += cifs_md4.o
-obj-$(CONFIG_SMB_COMMON_SMBDIRECT) += smbdirect/
diff --git a/fs/smb/common/smbdirect/Makefile b/fs/smb/common/smbdirect/Makefile
deleted file mode 100644 (file)
index 423f533..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# Makefile for smbdirect support
-#
-
-obj-$(CONFIG_SMB_COMMON_SMBDIRECT) += smbdirect.o
-
-smbdirect-y := \
-       smbdirect_socket.o      \
-       smbdirect_connection.o  \
-       smbdirect_mr.o          \
-       smbdirect_rw.o          \
-       smbdirect_debug.o       \
-       smbdirect_connect.o     \
-       smbdirect_listen.o      \
-       smbdirect_accept.o      \
-       smbdirect_devices.o     \
-       smbdirect_main.o
index 8827b3653786445cd3a55d4489c1ab74a384cbb6..08d8b7a965a64d408c38234c60b9ba7ade63de46 100644 (file)
@@ -49,7 +49,7 @@ config SMB_SERVER_SMBDIRECT
        bool "Support for SMB Direct protocol"
        depends on SMB_SERVER && INFINIBAND && INFINIBAND_ADDR_TRANS
        depends on SMB_SERVER=m || INFINIBAND=y
-       select SMB_COMMON_SMBDIRECT
+       select SMBDIRECT
        default n
 
        help
index 706a2c897948889d250c9ef003ec80fa7f4efb2b..a8242c00096f3765ec455f998fe784bb6f521703 100644 (file)
@@ -18,7 +18,7 @@
 #include "smb_common.h"
 #include "../common/smb2status.h"
 #include "transport_rdma.h"
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"
 
 
 #define SMB_DIRECT_PORT_IWARP          5445
index 05352dc47f952e647d15004646e7ada97034b341..bde3d88aecc7196c3d4575f857372989fc265a97 100644 (file)
@@ -25,6 +25,6 @@ static inline void init_smbd_max_io_size(unsigned int sz) { }
 static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }
 #endif
 
-#include "../common/smbdirect/smbdirect.h"
+#include "../smbdirect/smbdirect.h"
 
 #endif /* __KSMBD_TRANSPORT_RDMA_H__ */
similarity index 86%
rename from fs/smb/common/smbdirect/Kconfig
rename to fs/smb/smbdirect/Kconfig
index a46a2e6ec87ad7bae6395dbb0964d9cbcdd2a702..2bf1b3350f7d8e3cb454358a39c66d64557f94c3 100644 (file)
@@ -2,7 +2,7 @@
 #
 # smbdirect configuration
 
-config SMB_COMMON_SMBDIRECT
+config SMBDIRECT
        def_tristate n
        depends on INFINIBAND && INFINIBAND_ADDR_TRANS
        depends on m || INFINIBAND=y
diff --git a/fs/smb/smbdirect/Makefile b/fs/smb/smbdirect/Makefile
new file mode 100644 (file)
index 0000000..80d6025
--- /dev/null
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Makefile for smbdirect support
+#
+
+obj-$(CONFIG_SMBDIRECT) += smbdirect.o
+
+smbdirect-y := \
+       socket.o        \
+       connection.o    \
+       mr.o            \
+       rw.o            \
+       debug.o         \
+       connect.o       \
+       listen.o        \
+       accept.o        \
+       devices.o       \
+       main.o
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_accept.c
rename to fs/smb/smbdirect/accept.c
index d6d5e6a3f5de74ea6e3157c7314787065c47ca7a..704b271af3a8c0c43c41e7bf14964f12188355a5 100644 (file)
@@ -5,9 +5,9 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <net/sock.h>
-#include "../../common/smb2status.h"
+#include "../common/smb2status.h"
 
 static int smbdirect_accept_rdma_event_handler(struct rdma_cm_id *id,
                                               struct rdma_cm_event *event);
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_connect.c
rename to fs/smb/smbdirect/connect.c
index 2b54f79dba432b58b754bb461cc73649aefe02e5..8addee43a381138dddc2022ee55c9c68a90e452e 100644 (file)
@@ -3,8 +3,8 @@
  *   Copyright (c) 2012,2016,2017,2025 Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
-#include "../../common/smb2status.h"
+#include "internal.h"
+#include "../common/smb2status.h"
 
 static int smbdirect_connect_setup_connection(struct smbdirect_socket *sc);
 static int smbdirect_connect_resolve_addr(struct smbdirect_socket *sc,
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_connection.c
rename to fs/smb/smbdirect/connection.c
index 7e4921b9538c96851928f4c58a4465b2c603bb02..822366718d457d24b7871f55e2ac165acb81eb82 100644 (file)
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/folio_queue.h>
 
 struct smbdirect_map_sges {
similarity index 98%
rename from fs/smb/common/smbdirect/smbdirect_debug.c
rename to fs/smb/smbdirect/debug.c
index d8664fd7f71a148d005b2db42c9e34833e522f6b..a66a19d4a46341bdbb565f70ea25b3e92d7fb523 100644 (file)
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/seq_file.h>
 
 void smbdirect_connection_legacy_debug_proc_show(struct smbdirect_socket *sc,
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_devices.c
rename to fs/smb/smbdirect/devices.c
index aaab99e9c0454ff8f9afb4b98caf228740c93fbb..44962f221c352fdd17978444728879dfd722b9a6 100644 (file)
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025 Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static u8 smbdirect_ib_device_rdma_capable_node_type(struct ib_device *ib_dev)
 {
similarity index 98%
rename from fs/smb/common/smbdirect/smbdirect_internal.h
rename to fs/smb/smbdirect/internal.h
index 30a1b86436574877709fa243e8b7b0a7edeaab02..2d5acf2c21bc5590a93384055e0b383aaa3fdc6d 100644 (file)
@@ -9,8 +9,8 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include "smbdirect.h"
-#include "smbdirect_pdu.h"
-#include "smbdirect_public.h"
+#include "pdu.h"
+#include "public.h"
 
 #include <linux/mutex.h>
 
@@ -34,7 +34,7 @@ struct smbdirect_module_state {
 
 extern struct smbdirect_module_state smbdirect_globals;
 
-#include "smbdirect_socket.h"
+#include "socket.h"
 
 struct smbdirect_device {
        struct list_head list;
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_listen.c
rename to fs/smb/smbdirect/listen.c
index 05c7902e7020cdb77532d8062d99e919ecd6aa32..143a7618d95f3c02b0b219a706b577b2984f6a57 100644 (file)
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static int smbdirect_listen_rdma_event_handler(struct rdma_cm_id *id,
                                               struct rdma_cm_event *event);
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_main.c
rename to fs/smb/smbdirect/main.c
index fe6e8d93c34c68388a6f5099d0524ed931a4746d..606732fefb69dbff533f5941107b3779b3bfd1bc 100644 (file)
@@ -3,7 +3,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/module.h>
 
 struct smbdirect_module_state smbdirect_globals = {
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_mr.c
rename to fs/smb/smbdirect/mr.c
index fa9be8089925e4e6c5d00ae072ef7460f43e7e53..5228e699cd5d41a4ad9d363e0c4defa7fb1dd3bf 100644 (file)
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 /*
  * Allocate MRs used for RDMA read/write
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_rw.c
rename to fs/smb/smbdirect/rw.c
index 3b2eb8c48efcd00cb64d80e496c670def8848b64..c2f46b17731ec04ed88a8f45acfac87ca8bf49b0 100644 (file)
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static int smbdirect_connection_wait_for_rw_credits(struct smbdirect_socket *sc,
                                                    int credits)
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_socket.c
rename to fs/smb/smbdirect/socket.c
index 9153e1dbf53d5532d128759ae3411bc85d62d9fe..1b4ab01b745e65c63b0f9099b24e99fc181cadd2 100644 (file)
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 bool smbdirect_frwr_is_supported(const struct ib_device_attr *attrs)
 {