smb: client: simplify __build_path_from_dentry_optional_prefix()

Use the convenient 'strreplace()' to simplify
'__build_path_from_dentry_optional_prefix()'.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
This commit is contained in:
Dmitry Antipov
2026-08-14 07:14:18 +03:00
committed by Paulo Alcantara
parent 730d0bb195
commit 3fffaa8a64

View File

@@ -115,11 +115,7 @@ char *__build_path_from_dentry_optional_prefix(struct dentry *direntry, void *pa
}
if (dirsep != '/') {
/* BB test paths to Windows with '/' in the midst of prepath */
char *p;
for (p = s; *p; p++)
if (*p == '/')
*p = dirsep;
strreplace(s, '/', dirsep);
}
if (dfsplen) {
s -= dfsplen;