aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifs_fs_sb.h3
-rw-r--r--fs/cifs/cifsglob.h5
-rw-r--r--fs/cifs/connect.c9
-rw-r--r--fs/cifs/misc.c2
4 files changed, 13 insertions, 6 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index 5fb695f1e50b..f799f6f0e729 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -26,8 +26,7 @@
26#define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames */ 26#define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames */
27#define CIFS_MOUNT_POSIX_PATHS 0x40 /* Negotiate posix pathnames if possible. */ 27#define CIFS_MOUNT_POSIX_PATHS 0x40 /* Negotiate posix pathnames if possible. */
28#define CIFS_MOUNT_UNX_EMUL 0x80 /* Network compat with SFUnix emulation */ 28#define CIFS_MOUNT_UNX_EMUL 0x80 /* Network compat with SFUnix emulation */
29#define CIFS_MOUNT_CASE_INSENS 0x100 /* Request case insenstive searches */ 29#define CIFS_MOUNT_NO_BRL 0x100 /* No sending byte range locks to srv */
30#define CIFS_MOUNT_NO_BRL 0x200 /* No sending byte range locks to srv */
31 30
32struct cifs_sb_info { 31struct cifs_sb_info {
33 struct cifsTconInfo *tcon; /* primary mount */ 32 struct cifsTconInfo *tcon; /* primary mount */
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index e8287f76484f..e7ba48c61a7a 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -110,8 +110,8 @@ enum protocolEnum {
110 */ 110 */
111 111
112struct TCP_Server_Info { 112struct TCP_Server_Info {
113 char server_Name[SERVER_NAME_LEN_WITH_NULL]; /* 15 chars + X'20'in 16th */ 113 char server_Name[SERVER_NAME_LEN_WITH_NULL]; /* 15 chars + X'20' 16th */
114 char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; /* Unicode version of server_Name */ 114 char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2];
115 struct socket *ssocket; 115 struct socket *ssocket;
116 union { 116 union {
117 struct sockaddr_in sockAddr; 117 struct sockaddr_in sockAddr;
@@ -231,6 +231,7 @@ struct cifsTconInfo {
231 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if file system name truncated */ 231 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if file system name truncated */
232 FILE_SYSTEM_UNIX_INFO fsUnixInfo; 232 FILE_SYSTEM_UNIX_INFO fsUnixInfo;
233 unsigned retry:1; 233 unsigned retry:1;
234 unsigned nocase:1;
234 /* BB add field for back pointer to sb struct? */ 235 /* BB add field for back pointer to sb struct? */
235}; 236};
236 237
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 6b21f6aa9f60..ac2c8bdc8e55 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1048,6 +1048,11 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
1048 vol->nobrl = 0; 1048 vol->nobrl = 0;
1049 } else if (strnicmp(data, "nobrl", 5) == 0) { 1049 } else if (strnicmp(data, "nobrl", 5) == 0) {
1050 vol->nobrl = 1; 1050 vol->nobrl = 1;
1051 /* turn off mandatory locking in mode
1052 if remote locking is turned off since the
1053 local vfs will do advisory */
1054 if(vol->file_mode == (S_IALLUGO & ~(S_ISUID | S_IXGRP)))
1055 vol->file_mode = S_IALLUGO;
1051 } else if (strnicmp(data, "setuids", 7) == 0) { 1056 } else if (strnicmp(data, "setuids", 7) == 0) {
1052 vol->setuids = 1; 1057 vol->setuids = 1;
1053 } else if (strnicmp(data, "nosetuids", 9) == 0) { 1058 } else if (strnicmp(data, "nosetuids", 9) == 0) {
@@ -1707,8 +1712,6 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1707 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR; 1712 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR;
1708 if(volume_info.sfu_emul) 1713 if(volume_info.sfu_emul)
1709 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL; 1714 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL;
1710 if(volume_info.nocase)
1711 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CASE_INSENS;
1712 if(volume_info.nobrl) 1715 if(volume_info.nobrl)
1713 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL; 1716 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL;
1714 1717
@@ -1727,6 +1730,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1727 to the same server share the last value passed in 1730 to the same server share the last value passed in
1728 for the retry flag is used */ 1731 for the retry flag is used */
1729 tcon->retry = volume_info.retry; 1732 tcon->retry = volume_info.retry;
1733 tcon->nocase = volume_info.nocase;
1730 } else { 1734 } else {
1731 tcon = tconInfoAlloc(); 1735 tcon = tconInfoAlloc();
1732 if (tcon == NULL) 1736 if (tcon == NULL)
@@ -1755,6 +1759,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1755 if (!rc) { 1759 if (!rc) {
1756 atomic_inc(&pSesInfo->inUse); 1760 atomic_inc(&pSesInfo->inUse);
1757 tcon->retry = volume_info.retry; 1761 tcon->retry = volume_info.retry;
1762 tcon->nocase = volume_info.nocase;
1758 } 1763 }
1759 } 1764 }
1760 } 1765 }
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index beeff8284169..40d50b77bfe7 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -375,6 +375,8 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
375 } 375 }
376 if (treeCon->Flags & SMB_SHARE_IS_IN_DFS) 376 if (treeCon->Flags & SMB_SHARE_IS_IN_DFS)
377 buffer->Flags2 |= SMBFLG2_DFS; 377 buffer->Flags2 |= SMBFLG2_DFS;
378 if (treeCon->nocase)
379 buffer->Flags |= SMBFLG_CASELESS;
378 if((treeCon->ses) && (treeCon->ses->server)) 380 if((treeCon->ses) && (treeCon->ses->server))
379 if(treeCon->ses->server->secMode & 381 if(treeCon->ses->server->secMode &
380 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 382 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))