aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 b32208aad550..f327decfb155 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,
51 } 51 }
52 } else { 52 } else {
53 for (i = 0; (i < len) && from[i]; i++) { 53 for (i = 0; (i < len) && from[i]; i++) {
54 if (le16_to_cpu(from[i]) & 0xff00) { 54 if (unlikely(le16_to_cpu(from[i]) & 0xff00)) {
55 if (warn) { 55 to[i] = '?';
56 if (unlikely(warn)) {
56 warn--; 57 warn--;
57 warn_again--; 58 warn_again--;
58 printk(KERN_ERR 59 printk(KERN_ERR
@@ -61,7 +62,7 @@ int jfs_strfromUCS_le(char *to, const __le16 * from,
61 printk(KERN_ERR 62 printk(KERN_ERR
62 "mount with iocharset=utf8 to access\n"); 63 "mount with iocharset=utf8 to access\n");
63 } 64 }
64 to[i] = '?'; 65
65 } 66 }
66 else 67 else
67 to[i] = (char) (le16_to_cpu(from[i])); 68 to[i] = (char) (le16_to_cpu(from[i]));