diff options
-rw-r--r-- | fs/cifs/cifsglob.h | 1 | ||||
-rw-r--r-- | fs/cifs/connect.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 4f07f6fbe494..db9f985b8c2c 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -441,6 +441,7 @@ struct smb_vol { | |||
441 | bool mfsymlinks:1; /* use Minshall+French Symlinks */ | 441 | bool mfsymlinks:1; /* use Minshall+French Symlinks */ |
442 | bool multiuser:1; | 442 | bool multiuser:1; |
443 | bool rwpidforward:1; /* pid forward for read/write operations */ | 443 | bool rwpidforward:1; /* pid forward for read/write operations */ |
444 | bool nosharesock; | ||
444 | unsigned int rsize; | 445 | unsigned int rsize; |
445 | unsigned int wsize; | 446 | unsigned int wsize; |
446 | bool sockopt_tcp_nodelay:1; | 447 | bool sockopt_tcp_nodelay:1; |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index e3bc39bb9d12..180d9b95fab0 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -85,7 +85,7 @@ enum { | |||
85 | Opt_acl, Opt_noacl, Opt_locallease, | 85 | Opt_acl, Opt_noacl, Opt_locallease, |
86 | Opt_sign, Opt_seal, Opt_noac, | 86 | Opt_sign, Opt_seal, Opt_noac, |
87 | Opt_fsc, Opt_mfsymlinks, | 87 | Opt_fsc, Opt_mfsymlinks, |
88 | Opt_multiuser, Opt_sloppy, | 88 | Opt_multiuser, Opt_sloppy, Opt_nosharesock, |
89 | 89 | ||
90 | /* Mount options which take numeric value */ | 90 | /* Mount options which take numeric value */ |
91 | Opt_backupuid, Opt_backupgid, Opt_uid, | 91 | Opt_backupuid, Opt_backupgid, Opt_uid, |
@@ -165,6 +165,7 @@ static const match_table_t cifs_mount_option_tokens = { | |||
165 | { Opt_mfsymlinks, "mfsymlinks" }, | 165 | { Opt_mfsymlinks, "mfsymlinks" }, |
166 | { Opt_multiuser, "multiuser" }, | 166 | { Opt_multiuser, "multiuser" }, |
167 | { Opt_sloppy, "sloppy" }, | 167 | { Opt_sloppy, "sloppy" }, |
168 | { Opt_nosharesock, "nosharesock" }, | ||
168 | 169 | ||
169 | { Opt_backupuid, "backupuid=%s" }, | 170 | { Opt_backupuid, "backupuid=%s" }, |
170 | { Opt_backupgid, "backupgid=%s" }, | 171 | { Opt_backupgid, "backupgid=%s" }, |
@@ -1455,6 +1456,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1455 | case Opt_sloppy: | 1456 | case Opt_sloppy: |
1456 | sloppy = true; | 1457 | sloppy = true; |
1457 | break; | 1458 | break; |
1459 | case Opt_nosharesock: | ||
1460 | vol->nosharesock = true; | ||
1461 | break; | ||
1458 | 1462 | ||
1459 | /* Numeric Values */ | 1463 | /* Numeric Values */ |
1460 | case Opt_backupuid: | 1464 | case Opt_backupuid: |
@@ -2027,6 +2031,9 @@ static int match_server(struct TCP_Server_Info *server, struct smb_vol *vol) | |||
2027 | { | 2031 | { |
2028 | struct sockaddr *addr = (struct sockaddr *)&vol->dstaddr; | 2032 | struct sockaddr *addr = (struct sockaddr *)&vol->dstaddr; |
2029 | 2033 | ||
2034 | if (vol->nosharesock) | ||
2035 | return 0; | ||
2036 | |||
2030 | if ((server->vals != vol->vals) || (server->ops != vol->ops)) | 2037 | if ((server->vals != vol->vals) || (server->ops != vol->ops)) |
2031 | return 0; | 2038 | return 0; |
2032 | 2039 | ||