]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/cifs/misc.c
nfsd: Fix a memory scribble in the callback channel
[karo-tx-linux.git] / fs / cifs / misc.c
index 3b147dc6af6344ee5c5e616466403f2cc211dbcb..eea93ac15ef03e118e28a769df01c767a7137c3f 100644 (file)
@@ -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;