summaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/smb_common.h
diff options
context:
space:
mode:
authorHyunchul Lee <hyc.lee@gmail.com>2021-06-25 11:53:26 +0900
committerNamjae Jeon <namjae.jeon@samsung.com>2021-06-29 15:05:54 +0900
commitd8fb29980cb5369c4ea520c0b4e1a8893e88f14c (patch)
tree27f48999e33d1b20a9b9ac05791f52d47cf44c1c /fs/ksmbd/smb_common.h
parentd4075abbc6b571e9d03d7a742e53fd6085223649 (diff)
downloadlinux-d8fb29980cb5369c4ea520c0b4e1a8893e88f14c.tar.bz2
ksmbd: remove and replace macros with inline functions in smb_common.h
Remove and replace macros with inline functions in smb_common.h Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smb_common.h')
-rw-r--r--fs/ksmbd/smb_common.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ksmbd/smb_common.h b/fs/ksmbd/smb_common.h
index 084166ba7654..8489b92229fa 100644
--- a/fs/ksmbd/smb_common.h
+++ b/fs/ksmbd/smb_common.h
@@ -50,12 +50,6 @@
extern struct list_head global_lock_list;
-#define IS_SMB2(x) ((x)->vals->protocol_id != SMB10_PROT_ID)
-
-#define HEADER_SIZE(conn) ((conn)->vals->header_size)
-#define HEADER_SIZE_NO_BUF_LEN(conn) ((conn)->vals->header_size - 4)
-#define MAX_HEADER_SIZE(conn) ((conn)->vals->max_header_size)
-
/* RFC 1002 session packet types */
#define RFC1002_SESSION_MESSAGE 0x00
#define RFC1002_SESSION_REQUEST 0x81
@@ -490,6 +484,12 @@ struct smb_version_cmds {
int (*proc)(struct ksmbd_work *swork);
};
+static inline size_t
+smb2_hdr_size_no_buflen(struct smb_version_values *vals)
+{
+ return vals->header_size - 4;
+}
+
int ksmbd_min_protocol(void);
int ksmbd_max_protocol(void);