cifs: fix return value in cifsConvertToUTF16
authorJeff Layton <jlayton@redhat.com>
Tue, 18 Sep 2012 18:21:01 +0000 (14:21 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:30:58 +0000 (03:30 +0100)
commitf2efd134a36b1a818163ac8e18d3348c2d48e659
tree4492bfc7aa31c115e18b36a85433d04f9d56949e
parent691027008ac4f8f1943f7f3bbc4d825091aea670
cifs: fix return value in cifsConvertToUTF16

commit c73f693989d7a7d99ec66a7065295a0c93d0b127 upstream.

This function returns the wrong value, which causes the callers to get
the length of the resulting pathname wrong when it contains non-ASCII
characters.

This seems to fix https://bugzilla.samba.org/show_bug.cgi?id=6767

Reported-by: Baldvin Kovacs <baldvin.kovacs@gmail.com>
Reported-and-Tested-by: Nicolas Lefebvre <nico.lefebvre@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cifs/cifs_unicode.c