]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: refactor ACL setting control flow in id_mode_to_cifs_acl()
authorRalph Boehme <slow@samba.org>
Sat, 20 Jun 2026 07:06:58 +0000 (09:06 +0200)
committerSteve French <stfrench@microsoft.com>
Sat, 20 Jun 2026 15:15:40 +0000 (10:15 -0500)
commita540a64c4801fe02e452ee37e961018106418260
tree748ad0da823e0ac15271410b38d2e543674451a4
parent9647492b5e41954be59d5157eddbcd4cdc1656f7
smb: client: refactor ACL setting control flow in id_mode_to_cifs_acl()

Refactor the control flow in id_mode_to_cifs_acl() to reduce nesting and
prevent error code overwriting.

Instead of wrapping the call to ops->set_acl() in a conditional block,
introduce early exits (goto id_mode_to_cifs_acl_exit) when build_sec_desc()
fails or ops->set_acl is NULL. This ensures that any actual error returned
by build_sec_desc() is not overwritten with -EOPNOTSUPP.

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsacl.c