From 20c1cbd5eb1b05e67d23847d97ee8cdd63086ce1 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Sat, 28 Feb 2009 12:59:03 -0500 Subject: [PATCH] --- yaml --- r: 133614 b: refs/heads/master c: fcc7c09d94be7b75c9ea2beb22d0fae191c6b4b9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifssmb.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2dffc3a9f6e5..58d52086fd25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0382457744969b0a3aa39ba997944903c5972cbc +refs/heads/master: fcc7c09d94be7b75c9ea2beb22d0fae191c6b4b9 diff --git a/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index 4c344fe7a152..bc09c998631f 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -2377,8 +2377,10 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, PATH_MAX, nls_codepage, remap); name_len++; /* trailing null */ name_len *= 2; - pSMB->OldFileName[name_len] = 0; /* pad */ - pSMB->OldFileName[name_len + 1] = 0x04; + + /* protocol specifies ASCII buffer format (0x04) for unicode */ + pSMB->OldFileName[name_len] = 0x04; + pSMB->OldFileName[name_len + 1] = 0x00; /* pad */ name_len2 = cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], toName, PATH_MAX, nls_codepage, remap);