diff options
| -rw-r--r-- | fs/cifs/cifs_unicode.c | 14 | ||||
| -rw-r--r-- | fs/cifs/connect.c | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 23d43cde4306..1b2e180b018d 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
| @@ -277,6 +277,7 @@ cifsConvertToUCS(__le16 *target, const char *source, int srclen, | |||
| 277 | 277 | ||
| 278 | for (i = 0, j = 0; i < srclen; j++) { | 278 | for (i = 0, j = 0; i < srclen; j++) { |
| 279 | src_char = source[i]; | 279 | src_char = source[i]; |
| 280 | charlen = 1; | ||
| 280 | switch (src_char) { | 281 | switch (src_char) { |
| 281 | case 0: | 282 | case 0: |
| 282 | put_unaligned(0, &target[j]); | 283 | put_unaligned(0, &target[j]); |
| @@ -316,16 +317,13 @@ cifsConvertToUCS(__le16 *target, const char *source, int srclen, | |||
| 316 | dst_char = cpu_to_le16(0x003f); | 317 | dst_char = cpu_to_le16(0x003f); |
| 317 | charlen = 1; | 318 | charlen = 1; |
| 318 | } | 319 | } |
| 319 | /* | ||
| 320 | * character may take more than one byte in the source | ||
| 321 | * string, but will take exactly two bytes in the | ||
| 322 | * target string | ||
| 323 | */ | ||
| 324 | i += charlen; | ||
| 325 | continue; | ||
| 326 | } | 320 | } |
| 321 | /* | ||
| 322 | * character may take more than one byte in the source string, | ||
| 323 | * but will take exactly two bytes in the target string | ||
| 324 | */ | ||
| 325 | i += charlen; | ||
| 327 | put_unaligned(dst_char, &target[j]); | 326 | put_unaligned(dst_char, &target[j]); |
| 328 | i++; /* move to next char in source string */ | ||
| 329 | } | 327 | } |
| 330 | 328 | ||
| 331 | ctoUCS_out: | 329 | ctoUCS_out: |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 05f1dcf7d79a..277262a8e82f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -2673,6 +2673,11 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon, | |||
| 2673 | 0 /* not legacy */, cifs_sb->local_nls, | 2673 | 0 /* not legacy */, cifs_sb->local_nls, |
| 2674 | cifs_sb->mnt_cifs_flags & | 2674 | cifs_sb->mnt_cifs_flags & |
| 2675 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 2675 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| 2676 | |||
| 2677 | if (rc == -EOPNOTSUPP || rc == -EINVAL) | ||
| 2678 | rc = SMBQueryInformation(xid, tcon, full_path, pfile_info, | ||
| 2679 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | ||
| 2680 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 2676 | kfree(pfile_info); | 2681 | kfree(pfile_info); |
| 2677 | return rc; | 2682 | return rc; |
| 2678 | } | 2683 | } |
