Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297982
b: refs/heads/master
c: d816255
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton committed Mar 23, 2012
1 parent 25d1373 commit 6b8ca52
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8830d7e07a5e38bc47650a7554b7c1cfd49902bf
refs/heads/master: d81625587f4fac44a4367c468ba2fe2d981460f8
21 changes: 18 additions & 3 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ enum {
Opt_sign, Opt_seal, Opt_direct,
Opt_strictcache, Opt_noac,
Opt_fsc, Opt_mfsymlinks,
Opt_multiuser,
Opt_multiuser, Opt_sloppy,

/* Mount options which take numeric value */
Opt_backupuid, Opt_backupgid, Opt_uid,
Expand Down Expand Up @@ -167,6 +167,7 @@ static const match_table_t cifs_mount_option_tokens = {
{ Opt_fsc, "fsc" },
{ Opt_mfsymlinks, "mfsymlinks" },
{ Opt_multiuser, "multiuser" },
{ Opt_sloppy, "sloppy" },

{ Opt_backupuid, "backupuid=%s" },
{ Opt_backupgid, "backupgid=%s" },
Expand Down Expand Up @@ -1186,6 +1187,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
short int override_gid = -1;
bool uid_specified = false;
bool gid_specified = false;
bool sloppy = false;
char *invalid = NULL;
char *nodename = utsname()->nodename;
char *string = NULL;
char *tmp_end, *value;
Expand Down Expand Up @@ -1423,6 +1426,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
case Opt_multiuser:
vol->multiuser = true;
break;
case Opt_sloppy:
sloppy = true;
break;

/* Numeric Values */
case Opt_backupuid:
Expand Down Expand Up @@ -1870,15 +1876,24 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
goto cifs_parse_mount_err;
break;
default:
printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
data);
/*
* An option we don't recognize. Save it off for later
* if we haven't already found one
*/
if (!invalid)
invalid = data;
break;
}
/* Free up any allocated string */
kfree(string);
string = NULL;
}

if (!sloppy && invalid) {
printk(KERN_ERR "CIFS: Unknown mount option \"%s\"\n", invalid);
goto cifs_parse_mount_err;
}

#ifndef CONFIG_KEYS
/* Muliuser mounts require CONFIG_KEYS support */
if (vol->multiuser) {
Expand Down

0 comments on commit 6b8ca52

Please sign in to comment.