diff options
| author | Huiwen He <hehuiwen@kylinos.cn> | 2026-04-02 14:18:37 +0000 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-04-05 19:58:40 -0500 |
| commit | 95e6b7340957f8b51e6abb97c666eadd37f1f69f (patch) | |
| tree | 95881eb383460b1dea11d903746cde83cad99e70 /arch/ppc/boot/lib/git@git.tavy.me:linux.git | |
| parent | 58ac796bb3c0f7b8295046404629724b68b40fa0 (diff) | |
smb/client: use binary search for SMB1 DOS/SRV error mapping
Currently, map_smb_to_linux_error() uses linear searches for both
mapping_table_ERRDOS[] and mapping_table_ERRSRV[].
Refactor this by introducing search_mapping_table_ERRDOS() and
search_mapping_table_ERRSRV() that implements binary search(as the tables
are sorted).This improves lookup performance and reduces code duplication.
Also remove the sentinel entries from the mapping tables as they are no
longer needed with ARRAY_SIZE().
Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'arch/ppc/boot/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
