cifs/dir.c: use correct path separator
Subsystems (2)
PATCH 1/1 cifs/dir.c: use correct path separator
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-IBi9RG/[email protected]>
Date: Tue, 6 Sep 2016 19:58:28 +0200
Subject: [PATCH] fs/cifs/dir.c: use correct path separator
--- fs/cifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/dir.c +1 -1
@@ -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);
Signature · 1 line
2.1.4
Signature · 5 lines
-- 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)
A message that is not in the archive (sent off-list or not yet received): mps60q8sy4z.fsf-IBi9RG/[email protected]
Quoted 6 lines · Aurélien Aptel
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. UseCIFS_DIR_SEPinstead.
Hello Aurélien,
Can you please add this summary to the patch summary and repost the patch using git send-email instead. Having the patch inline makes it a bit easier to review the patch.
Sachin Prabhu
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Sachin Prabhu
Can you please add this summary to the patch summary and repost the patch using git send-email instead. Having the patch inline makes it a bit easier to review the patch.
No problem. I've took time to work on it a bit before re-sending too (new thread).
Signature · 4 lines
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)