summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorZe Tan <tanze@kylinos.cn>2026-08-11 14:00:47 +0800
committerPaulo Alcantara <pc@manguebit.org>2026-08-24 17:08:53 -0300
commit43549eb84266c424ee6c004f149574e2ae4b6515 (patch)
tree2e11e136056154b8f87a4a4d9d3a200d818e6f25 /include/linux
parent9437f2113b60a5a8593aa4b41b6f6632f5cabcfd (diff)
smb/client: decode reparse metadata using its payload type
cifs_open_info_data stores FILE_ALL_INFORMATION and SMB3 POSIX query information in a union. reparse_info_to_fattr() selects a union member from the mount mode, while several directory checks always read fi.Attributes. The metadata can instead come from an SMB2 CREATE response on a POSIX mount, or from a POSIX query while processing a reparse point. In those cases the mount mode and hard-coded fi accesses select the wrong union member. See the procedures below: cifs_nt_open smb2_open_file SMB2_open data->fi = SMB2 CREATE response data->contains_posix_file_info = false cifs_get_inode_info reparse_info_to_fattr if (tcon->posix_extensions) // true smb311_posix_info_to_fattr data->posix_fi // wrong union member smb311_posix_get_fattr smb2_query_path_info smb2_compound_op data->posix_fi = SMB3 POSIX query response data->contains_posix_file_info = true reparse_info_to_fattr data->fi.Attributes // wrong union member Add a common DOS attribute accessor and use contains_posix_file_info both for attribute reads and for the final fattr conversion. Signed-off-by: Ze Tan <tanze@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions