]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb/client: use binary search for NT status to DOS mapping
authorHuiwen He <hehuiwen@kylinos.cn>
Thu, 2 Apr 2026 14:18:31 +0000 (14:18 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 6 Apr 2026 00:58:40 +0000 (19:58 -0500)
commit3c6c23ed9424cfd5a648863dc058c52094b1b99d
treef7329bde0cee012dcb858c5ee39d78b327e9dfe8
parent772d5920c3d417fc4ba44c0b6fb61ca4f19f5809
smb/client: use binary search for NT status to DOS mapping

The ntstatus_to_dos_map[] table is sorted now. Replace the linear search
with binary search to improve lookup performance.

Also remove the sentinel entry as it is 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>
fs/smb/client/smb1maperror.c