diff options
| author | Denis Kulikov <dar1knessx@gmail.com> | 2026-10-26 15:55:41 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-27 18:19:22 +0900 |
| commit | 03b47bdc9ac8e9dacbf1d66a1dfc54b328e283f2 (patch) | |
| tree | eae0e5a8c0c89beca262c2bcd0bc193d189884cf /scripts/basic | |
| parent | 146c3fc6540e24eef6296395a35bf5b924182e8b (diff) | |
| download | linux-03b47bdc9ac8e9dacbf1d66a1dfc54b328e283f2.tar.gz linux-03b47bdc9ac8e9dacbf1d66a1dfc54b328e283f2.zip | |
ksmbd: use the resolved share path for the share root
If the share path is a mount point and crossmnt is not set (crossmnt = no,
or ksmbd-tools that predate the option), the share root looks empty to
clients: QUERY_DIRECTORY on it returns only "." and "..". Files created
in the root go to the mounted filesystem, but a directory query cannot
find them afterwards, so e.g. "rm" of a file that was just uploaded
fails with STATUS_NO_SUCH_FILE.
An empty name refers to the share root. For it, ksmbd_vfs_path_lookup()
looks up share_conf->path again starting from its parent, and the mount
on the last component is not followed, which gives the directory covered
by the mount. All other names are looked up relative to
share_conf->vfs_path, which was resolved through the mount when the
share was set up.
share_conf->vfs_path already refers to the share root, so return a
reference to it instead of looking the path up again.
Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name")
Signed-off-by: Denis Kulikov <dar1knessx@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
