diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 03:13:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 03:13:11 -0700 |
commit | 8864f5ee12d03afe269edeeae440744f53ea4af1 (patch) | |
tree | 0e1cc41695c6a25f3a56e43951f9c07e00c7a579 | |
parent | f12a20fc9bfba4218ecbc4e40c8e08dc2a85dc99 (diff) | |
parent | 11379b5e33950048ad66825da7f462b0d0da9d73 (diff) | |
download | op-kernel-dev-8864f5ee12d03afe269edeeae440744f53ea4af1.zip op-kernel-dev-8864f5ee12d03afe269edeeae440744f53ea4af1.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: fix cifsConvertToUCS() for the mapchars case
cifs: add fallback in is_path_accessible for old servers
-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 23d43cd..1b2e180 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, for (i = 0, j = 0; i < srclen; j++) { src_char = source[i]; + charlen = 1; switch (src_char) { case 0: put_unaligned(0, &target[j]); @@ -316,16 +317,13 @@ cifsConvertToUCS(__le16 *target, const char *source, int srclen, dst_char = cpu_to_le16(0x003f); charlen = 1; } - /* - * character may take more than one byte in the source - * string, but will take exactly two bytes in the - * target string - */ - i += charlen; - continue; } + /* + * character may take more than one byte in the source string, + * but will take exactly two bytes in the target string + */ + i += charlen; put_unaligned(dst_char, &target[j]); - i++; /* move to next char in source string */ } ctoUCS_out: diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 05f1dcf..277262a 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2673,6 +2673,11 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon, 0 /* not legacy */, cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); + + if (rc == -EOPNOTSUPP || rc == -EINVAL) + rc = SMBQueryInformation(xid, tcon, full_path, pfile_info, + cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & + CIFS_MOUNT_MAP_SPECIAL_CHR); kfree(pfile_info); return rc; } |