aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorGael Blivet <gael.blivet@gmail.com>2026-09-14 01:26:35 +0200
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-21 08:55:16 +0900
commitb4a07ab5d33f02ae1d953ecd51fbb4156f3eaaee (patch)
tree7982fb989f9e4f5feb3360f134940445389e2b58 /scripts/Makefile.thinlto
parentksmbd: doc: update feature status (diff)
ksmbd: copy stream content when renaming to a new stream name
smb2_rename() creates the target stream with ksmbd_vfs_setxattr(..., NULL, 0, ...), so the source stream's content is not carried over and renaming a named stream produces a zero-length stream. Read the source stream and write it under the new name. The lookup is case-insensitive because smb2_set_stream_name_xattr() stores fp->stream.name with the client's casing, which need not be the casing on disk. A rename to the stream the handle already refers to does nothing; that comparison is case-insensitive too, since every lookup in this path is. A read failure now fails the rename instead of creating an empty target, and a write failure reports its own errno rather than -EINVAL, since writing a value can fail where writing an empty one could not. Initialize s_type, which parse_stream_name() assigns only when the name carries an explicit stream type and which selects the target xattr name. parse_stream_name() leaves the stream name empty when the stream part is, as in "::$DATA" or ":", returning NULL for the first spelling and "" for the second. Return without creating an xattr in either case, after the base name check so that a base ending in '/' is covered too. These previously created xattrs named "(null)" and "". The source xattr is left in place and fp->stream.name still refers to it, as before this change: readers of that pointer take no lock, so it cannot be swapped here. Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions