diff --git a/vfs.c b/vfs.c index e1e9d9cb..652f90d3 100644 --- a/vfs.c +++ b/vfs.c @@ -2852,6 +2852,7 @@ int ksmbd_vfs_kern_path_locked(struct ksmbd_work *work, char *name, filepath, flags, path); + next[0] = '/'; if (err) goto out2; else if (is_last) @@ -2859,7 +2860,6 @@ int ksmbd_vfs_kern_path_locked(struct ksmbd_work *work, char *name, path_put(parent_path); *parent_path = *path; - next[0] = '/'; remain_len -= filename_len + 1; }