]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cifs: SMB1 split: Move inline funcs
authorDavid Howells <dhowells@redhat.com>
Wed, 17 Dec 2025 15:14:22 +0000 (15:14 +0000)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:07:45 +0000 (17:07 -0600)
Move some SMB1-specific inline funcs to smb1proto.h.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Enzo Matsumiya <ematsumiya@suse.de>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-kernel@vger.kernel.org
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/smb1proto.h

index c44013e671e3a7c1fa9639016e96943eb985cf9a..7eb0131963dd30e8882e6244fcc9a46c575b8c97 100644 (file)
@@ -949,18 +949,6 @@ revert_current_mid_from_hdr(struct TCP_Server_Info *server,
        return revert_current_mid(server, num > 0 ? num : 1);
 }
 
-static inline __u16
-get_mid(const struct smb_hdr *smb)
-{
-       return le16_to_cpu(smb->Mid);
-}
-
-static inline bool
-compare_mid(__u16 mid, const struct smb_hdr *smb)
-{
-       return mid == le16_to_cpu(smb->Mid);
-}
-
 /*
  * When the server supports very large reads and writes via POSIX extensions,
  * we can allow up to 2^24-1, minus the size of a READ/WRITE_AND_X header, not
index 921c9357b4cafa737161840a8906aeacd34295fd..d683ffafd7067a0668d48ffc4e8c32e82e66233f 100644 (file)
@@ -242,6 +242,18 @@ int checkSMB(char *buf, unsigned int pdu_len, unsigned int total_read,
             struct TCP_Server_Info *server);
 
 
+static inline __u16
+get_mid(const struct smb_hdr *smb)
+{
+       return le16_to_cpu(smb->Mid);
+}
+
+static inline bool
+compare_mid(__u16 mid, const struct smb_hdr *smb)
+{
+       return mid == le16_to_cpu(smb->Mid);
+}
+
 #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
 
 #define GETU16(var)  (*((__u16 *)var)) /* BB check for endian issues */