diff options
-rw-r--r-- | fs/cifs/connect.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0a7fdc31f253..5b97e56ddbca 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1258,14 +1258,18 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1258 | vol->backupuid_specified = false; /* no backup intent for a user */ | 1258 | vol->backupuid_specified = false; /* no backup intent for a user */ |
1259 | vol->backupgid_specified = false; /* no backup intent for a group */ | 1259 | vol->backupgid_specified = false; /* no backup intent for a group */ |
1260 | 1260 | ||
1261 | /* | 1261 | switch (cifs_parse_devname(devname, vol)) { |
1262 | * For now, we ignore -EINVAL errors under the assumption that the | 1262 | case 0: |
1263 | * unc= and prefixpath= options will be usable. | 1263 | break; |
1264 | */ | 1264 | case -ENOMEM: |
1265 | if (cifs_parse_devname(devname, vol) == -ENOMEM) { | 1265 | cifs_dbg(VFS, "Unable to allocate memory for devname.\n"); |
1266 | printk(KERN_ERR "CIFS: Unable to allocate memory to parse " | 1266 | goto cifs_parse_mount_err; |
1267 | "device string.\n"); | 1267 | case -EINVAL: |
1268 | goto out_nomem; | 1268 | cifs_dbg(VFS, "Malformed UNC in devname.\n"); |
1269 | goto cifs_parse_mount_err; | ||
1270 | default: | ||
1271 | cifs_dbg(VFS, "Unknown error parsing devname.\n"); | ||
1272 | goto cifs_parse_mount_err; | ||
1269 | } | 1273 | } |
1270 | 1274 | ||
1271 | while ((data = strsep(&options, separator)) != NULL) { | 1275 | while ((data = strsep(&options, separator)) != NULL) { |
@@ -1827,7 +1831,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1827 | } | 1831 | } |
1828 | #endif | 1832 | #endif |
1829 | if (!vol->UNC) { | 1833 | if (!vol->UNC) { |
1830 | cifs_dbg(VFS, "CIFS mount error: No usable UNC path provided in device string or in unc= option!\n"); | 1834 | cifs_dbg(VFS, "CIFS mount error: No usable UNC path provided in device string!\n"); |
1831 | goto cifs_parse_mount_err; | 1835 | goto cifs_parse_mount_err; |
1832 | } | 1836 | } |
1833 | 1837 | ||