diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-03-04 11:19:21 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-03-04 11:19:21 +0100 |
| commit | cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de (patch) | |
| tree | fba004535821850f0d10cc4deac3885545083f0c /fs/smb/client/reparse.h | |
| parent | ad546940b5991d3e141238cd80a6d1894b767184 (diff) | |
| parent | 4f2a0b765c9731d2fa94e209ee9ae0e96b280f17 (diff) | |
Merge branch 'x86/cpu' into x86/asm, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/smb/client/reparse.h')
| -rw-r--r-- | fs/smb/client/reparse.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/fs/smb/client/reparse.h b/fs/smb/client/reparse.h index 5a753fec7e2c..c0be5ab45a78 100644 --- a/fs/smb/client/reparse.h +++ b/fs/smb/client/reparse.h @@ -99,14 +99,30 @@ static inline bool reparse_inode_match(struct inode *inode, static inline bool cifs_open_data_reparse(struct cifs_open_info_data *data) { - struct smb2_file_all_info *fi = &data->fi; - u32 attrs = le32_to_cpu(fi->Attributes); + u32 attrs; bool ret; - ret = data->reparse_point || (attrs & ATTR_REPARSE); - if (ret) - attrs |= ATTR_REPARSE; - fi->Attributes = cpu_to_le32(attrs); + if (data->contains_posix_file_info) { + struct smb311_posix_qinfo *fi = &data->posix_fi; + + attrs = le32_to_cpu(fi->DosAttributes); + if (data->reparse_point) { + attrs |= ATTR_REPARSE; + fi->DosAttributes = cpu_to_le32(attrs); + } + + } else { + struct smb2_file_all_info *fi = &data->fi; + + attrs = le32_to_cpu(fi->Attributes); + if (data->reparse_point) { + attrs |= ATTR_REPARSE; + fi->Attributes = cpu_to_le32(attrs); + } + } + + ret = attrs & ATTR_REPARSE; + return ret; } |