summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-05-17 12:45:31 +0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-05-23 12:33:08 +0400
commit1887f60103aaeeeb7a3fbf3b366d626043873164 (patch)
treefda4c3574550dd4d84f7c656748671edeec7468b /fs/cifs/cifsglob.h
parent082d0642c61fc309ca7f6133968ba1264193dcc1 (diff)
downloadlinux-1887f60103aaeeeb7a3fbf3b366d626043873164.tar.bz2
CIFS: Move header_size/max_header_size to ops structure
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 5b108382902a..9ee832d29ec7 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -177,8 +177,13 @@ struct smb_version_values {
__u32 exclusive_lock_type;
__u32 shared_lock_type;
__u32 unlock_lock_type;
+ size_t header_size;
+ size_t max_header_size;
};
+#define HEADER_SIZE(server) (server->vals->header_size)
+#define MAX_HEADER_SIZE(server) (server->vals->max_header_size)
+
struct smb_vol {
char *username;
char *password;
@@ -374,18 +379,6 @@ has_credits(struct TCP_Server_Info *server, int *credits)
return num > 0;
}
-static inline size_t
-header_size(void)
-{
- return sizeof(struct smb_hdr);
-}
-
-static inline size_t
-max_header_size(void)
-{
- return MAX_CIFS_HDR_SIZE;
-}
-
/*
* Macros to allow the TCP_Server_Info->net field and related code to drop out
* when CONFIG_NET_NS isn't set.