Current code hardcodes the path separator to backslash. The loop after it that switches the slashes direction only operates on the dfs prefix, not the whole path. Use CIFS_DIR_SEP instead.
From cf6070073e817e48efc5ec72639eaeb848d6c002 Mon Sep 17 00:00:00 2001 From: Aurelien Aptel <aaptel@xxxxxxxx> Date: Tue, 6 Sep 2016 19:58:28 +0200 Subject: [PATCH] fs/cifs/dir.c: use correct path separator Signed-off-by: Aurelien Aptel <aaptel@xxxxxxxx> --- fs/cifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 4716c54..c753748 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -163,7 +163,7 @@ cifs_bp_rename_retry: cifs_dbg(FYI, "using cifs_sb prepath <%s>\n", cifs_sb->prepath); memcpy(full_path+dfsplen+1, cifs_sb->prepath, pplen-1); - full_path[dfsplen] = '\\'; + full_path[dfsplen] = CIFS_DIR_SEP(cifs_sb); for (i = 0; i < pplen-1; i++) if (full_path[dfsplen+1+i] == '/') full_path[dfsplen+1+i] = CIFS_DIR_SEP(cifs_sb); -- 2.1.4
-- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Attachment:
signature.asc
Description: PGP signature