diff options
-rw-r--r-- | fs/cifs/connect.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 3d72218bd96..980815426ac 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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, @@ -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" }, @@ -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; @@ -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: @@ -1870,8 +1876,12 @@ 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 */ @@ -1879,6 +1889,11 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, 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) { |