Skip to content
Unverified Commit 4e1da8fe authored by Uros Bizjak's avatar Uros Bizjak Committed by Christian Brauner (Microsoft)
Browse files

posix_acl: Use try_cmpxchg in get_acl



Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old
in get_acl. x86 CMPXCHG instruction returns success in ZF flag,
so this change saves a compare after cmpxchg (and related move
instruction in front of cmpxchg).

No functional change intended.

Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
parent 1b929c02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment