aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d6a3c1c8a6f8..351942042833 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -89,6 +89,7 @@ struct smb_vol {
89 bool nullauth:1; /* attempt to authenticate with null user */ 89 bool nullauth:1; /* attempt to authenticate with null user */
90 bool nocase:1; /* request case insensitive filenames */ 90 bool nocase:1; /* request case insensitive filenames */
91 bool nobrl:1; /* disable sending byte range locks to srv */ 91 bool nobrl:1; /* disable sending byte range locks to srv */
92 bool mand_lock:1; /* send mandatory not posix byte range lock reqs */
92 bool seal:1; /* request transport encryption on share */ 93 bool seal:1; /* request transport encryption on share */
93 bool nodfs:1; /* Do not request DFS, even if available */ 94 bool nodfs:1; /* Do not request DFS, even if available */
94 bool local_lease:1; /* check leases only on local system, not remote */ 95 bool local_lease:1; /* check leases only on local system, not remote */
@@ -1246,6 +1247,17 @@ cifs_parse_mount_options(char *options, const char *devname,
1246 if (vol->file_mode == 1247 if (vol->file_mode ==
1247 (S_IALLUGO & ~(S_ISUID | S_IXGRP))) 1248 (S_IALLUGO & ~(S_ISUID | S_IXGRP)))
1248 vol->file_mode = S_IALLUGO; 1249 vol->file_mode = S_IALLUGO;
1250 } else if (strnicmp(data, "forcemandatorylock", 9) == 0) {
1251 /* will take the shorter form "forcemand" as well */
1252 /* This mount option will force use of mandatory
1253 (DOS/Windows style) byte range locks, instead of
1254 using posix advisory byte range locks, even if the
1255 Unix extensions are available and posix locks would
1256 be supported otherwise. If Unix extensions are not
1257 negotiated this has no effect since mandatory locks
1258 would be used (mandatory locks is all that those
1259 those servers support) */
1260 vol->mand_lock = 1;
1249 } else if (strnicmp(data, "setuids", 7) == 0) { 1261 } else if (strnicmp(data, "setuids", 7) == 0) {
1250 vol->setuids = 1; 1262 vol->setuids = 1;
1251 } else if (strnicmp(data, "nosetuids", 9) == 0) { 1263 } else if (strnicmp(data, "nosetuids", 9) == 0) {
@@ -2150,6 +2162,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
2150 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL; 2162 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL;
2151 if (pvolume_info->nobrl) 2163 if (pvolume_info->nobrl)
2152 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL; 2164 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL;
2165 if (pvolume_info->mand_lock)
2166 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NOPOSIXBRL;
2153 if (pvolume_info->cifs_acl) 2167 if (pvolume_info->cifs_acl)
2154 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CIFS_ACL; 2168 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CIFS_ACL;
2155 if (pvolume_info->override_uid) 2169 if (pvolume_info->override_uid)