aboutsummaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_unicode.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-07-13 23:09:23 +0100
committerAnton Altaparmakov <aia21@cantab.net>2005-07-13 23:09:23 +0100
commitc514720716c7b109ff980f8b3cb93f9af872c91c (patch)
tree490a9578995705de69712893a190b67651bddc56 /fs/jfs/jfs_unicode.c
parent07929dcb963786512c760dd3ecd148d89295e7e5 (diff)
parent1e279dd855d15b72364b4103f872d67d8592647e (diff)
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'fs/jfs/jfs_unicode.c')
-rw-r--r--fs/jfs/jfs_unicode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/jfs/jfs_unicode.c b/fs/jfs/jfs_unicode.c
index b32208aad55..f327decfb15 100644
--- a/fs/jfs/jfs_unicode.c
+++ b/fs/jfs/jfs_unicode.c
@@ -51,8 +51,9 @@ int jfs_strfromUCS_le(char *to, const __le16 * from,
}
} else {
for (i = 0; (i < len) && from[i]; i++) {
- if (le16_to_cpu(from[i]) & 0xff00) {
- if (warn) {
+ if (unlikely(le16_to_cpu(from[i]) & 0xff00)) {
+ to[i] = '?';
+ if (unlikely(warn)) {
warn--;
warn_again--;
printk(KERN_ERR
@@ -61,7 +62,7 @@ int jfs_strfromUCS_le(char *to, const __le16 * from,
printk(KERN_ERR
"mount with iocharset=utf8 to access\n");
}
- to[i] = '?';
+
}
else
to[i] = (char) (le16_to_cpu(from[i]));