summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-07-08 18:48:15 -0500
committerSteve French <smfrench@gmail.com>2017-07-08 18:57:07 -0500
commit2a38e12053b760a8f5e85030eb89512660077c15 (patch)
tree63c2fb7884899653fb85a5249708bccc58e1e9ef /fs/cifs/misc.c
parent511c54a2f69195b28afb9dd119f03787b1625bb4 (diff)
downloadlinux-2a38e12053b760a8f5e85030eb89512660077c15.tar.bz2
[SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred
Remove the CONFIG_CIFS_SMB2 ifdef and Kconfig option since they must always be on now. For various security reasons, SMB3 and later are STRONGLY preferred over CIFS and older dialects, and SMB3 (and later) will now be the default dialects so we do not want to allow them to be ifdeffed out. In the longer term, we may be able to make older CIFS support disableable in Kconfig with a new set of #ifdef, but we always want SMB3 and later support enabled. Signed-off-by: Steven French <smfrench@gmail.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 3b147dc6af63..eea93ac15ef0 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -30,9 +30,7 @@
#include "smberr.h"
#include "nterr.h"
#include "cifs_unicode.h"
-#ifdef CONFIG_CIFS_SMB2
#include "smb2pdu.h"
-#endif
extern mempool_t *cifs_sm_req_poolp;
extern mempool_t *cifs_req_poolp;
@@ -149,15 +147,12 @@ struct smb_hdr *
cifs_buf_get(void)
{
struct smb_hdr *ret_buf = NULL;
- size_t buf_size = sizeof(struct smb_hdr);
-
-#ifdef CONFIG_CIFS_SMB2
/*
* SMB2 header is bigger than CIFS one - no problems to clean some
* more bytes for CIFS.
*/
- buf_size = sizeof(struct smb2_hdr);
-#endif
+ size_t buf_size = sizeof(struct smb2_hdr);
+
/*
* We could use negotiated size instead of max_msgsize -
* but it may be more efficient to always alloc same size
@@ -620,9 +615,7 @@ void
cifs_add_pending_open_locked(struct cifs_fid *fid, struct tcon_link *tlink,
struct cifs_pending_open *open)
{
-#ifdef CONFIG_CIFS_SMB2
memcpy(open->lease_key, fid->lease_key, SMB2_LEASE_KEY_SIZE);
-#endif
open->oplock = CIFS_OPLOCK_NO_CHANGE;
open->tlink = tlink;
fid->pending_open = open;