summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2025-08-11 14:52:38 +0200
committerChristian Brauner <brauner@kernel.org>2025-08-25 14:09:00 +0200
commit14498ca7e0f18cd73ab0010cbfbf9413a9f0a96f (patch)
tree8d3c9a3a76bef235d95bb0197c22f21c2e06bcef /scripts/lib/kdoc/kdoc_parser.py
parent278033a225e13ec21900f0a92b8351658f5377f2 (diff)
fs: Use try_cmpxchg() in start_dir_add()
Use try_cmpxchg() instead of cmpxchg(*ptr, old, new) == old. The x86 CMPXCHG instruction returns success in the ZF flag, so this change saves a compare after CMPXCHG (and related move instruction in front of CMPXCHG). Note that the value from *ptr should be read using READ_ONCE() to prevent the compiler from merging, refetching or reordering the read. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Link: https://lore.kernel.org/20250811125308.616717-1-ubizjak@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions