X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fjfs%2Fjfs_unicode.c;fp=fs%2Fjfs%2Fjfs_unicode.c;h=f327decfb1556c5abb146e999bf1bd1cb94b4a6b;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=b32208aad5508ee86afa10a3319f8af58fad2582;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/fs/jfs/jfs_unicode.c b/fs/jfs/jfs_unicode.c index b32208aad..f327decfb 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]));