Commit 281e2e7d authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: remove the cifs_ses->flags field

This field is completely unused:

CIFS_SES_W9X is completely unused. CIFS_SES_LANMAN and CIFS_SES_OS2
are set but never checked. CIFS_SES_NT4 is checked, but never set.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Acked-by: default avatarPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 3534b850
...@@ -692,7 +692,6 @@ struct cifs_ses { ...@@ -692,7 +692,6 @@ struct cifs_ses {
enum statusEnum status; enum statusEnum status;
unsigned overrideSecFlg; /* if non-zero override global sec flags */ unsigned overrideSecFlg; /* if non-zero override global sec flags */
__u16 ipc_tid; /* special tid for connection to IPC share */ __u16 ipc_tid; /* special tid for connection to IPC share */
__u16 flags;
__u16 vcnum; __u16 vcnum;
char *serverOS; /* name of operating system underlying server */ char *serverOS; /* name of operating system underlying server */
char *serverNOS; /* name of network operating system of server */ char *serverNOS; /* name of network operating system of server */
...@@ -715,15 +714,6 @@ struct cifs_ses { ...@@ -715,15 +714,6 @@ struct cifs_ses {
#endif /* CONFIG_CIFS_SMB2 */ #endif /* CONFIG_CIFS_SMB2 */
}; };
/* no more than one of the following three session flags may be set */
#define CIFS_SES_NT4 1
#define CIFS_SES_OS2 2
#define CIFS_SES_W9X 4
/* following flag is set for old servers such as OS2 (and Win95?)
which do not negotiate NTLM or POSIX dialects, but instead
negotiate one of the older LANMAN dialects */
#define CIFS_SES_LANMAN 8
static inline bool static inline bool
cap_unix(struct cifs_ses *ses) cap_unix(struct cifs_ses *ses)
{ {
......
...@@ -3834,7 +3834,6 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, ...@@ -3834,7 +3834,6 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
int rc = -ENOSYS; int rc = -ENOSYS;
struct TCP_Server_Info *server = ses->server; struct TCP_Server_Info *server = ses->server;
ses->flags = 0;
ses->capabilities = server->capabilities; ses->capabilities = server->capabilities;
if (linuxExtEnabled == 0) if (linuxExtEnabled == 0)
ses->capabilities &= (~server->vals->cap_unix); ses->capabilities &= (~server->vals->cap_unix);
......
...@@ -328,10 +328,8 @@ static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft, ...@@ -328,10 +328,8 @@ static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
ses->serverOS = kzalloc(len + 1, GFP_KERNEL); ses->serverOS = kzalloc(len + 1, GFP_KERNEL);
if (ses->serverOS) if (ses->serverOS)
strncpy(ses->serverOS, bcc_ptr, len); strncpy(ses->serverOS, bcc_ptr, len);
if (strncmp(ses->serverOS, "OS/2", 4) == 0) { if (strncmp(ses->serverOS, "OS/2", 4) == 0)
cifs_dbg(FYI, "OS/2 server\n"); cifs_dbg(FYI, "OS/2 server\n");
ses->flags |= CIFS_SES_OS2;
}
bcc_ptr += len + 1; bcc_ptr += len + 1;
bleft -= len + 1; bleft -= len + 1;
...@@ -642,8 +640,6 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, ...@@ -642,8 +640,6 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
} }
bcc_ptr = str_area; bcc_ptr = str_area;
ses->flags &= ~CIFS_SES_LANMAN;
iov[1].iov_base = NULL; iov[1].iov_base = NULL;
iov[1].iov_len = 0; iov[1].iov_len = 0;
...@@ -667,7 +663,6 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, ...@@ -667,7 +663,6 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
ses->server->sec_mode & SECMODE_PW_ENCRYPT ? ses->server->sec_mode & SECMODE_PW_ENCRYPT ?
true : false, lnm_session_key); true : false, lnm_session_key);
ses->flags |= CIFS_SES_LANMAN;
memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE); memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE);
bcc_ptr += CIFS_AUTH_RESP_SIZE; bcc_ptr += CIFS_AUTH_RESP_SIZE;
......
...@@ -765,20 +765,14 @@ smb_set_file_info(struct inode *inode, const char *full_path, ...@@ -765,20 +765,14 @@ smb_set_file_info(struct inode *inode, const char *full_path,
} }
tcon = tlink_tcon(tlink); tcon = tlink_tcon(tlink);
/* rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb->local_nls,
* NT4 apparently returns success on this call, but it doesn't really
* work.
*/
if (!(tcon->ses->flags & CIFS_SES_NT4)) {
rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf,
cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags & cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc == 0) { if (rc == 0) {
cinode->cifsAttrs = le32_to_cpu(buf->Attributes); cinode->cifsAttrs = le32_to_cpu(buf->Attributes);
goto out; goto out;
} else if (rc != -EOPNOTSUPP && rc != -EINVAL) } else if (rc != -EOPNOTSUPP && rc != -EINVAL) {
goto out; goto out;
} }
cifs_dbg(FYI, "calling SetFileInfo since SetPathInfo for times not supported by this server\n"); cifs_dbg(FYI, "calling SetFileInfo since SetPathInfo for times not supported by this server\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment