summaryrefslogtreecommitdiffstats
path: root/fs/posix_acl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-02-20 12:14:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-02-20 12:14:33 -0800
commit91bc559d8d3aed488b4b50e9eba1d7ebb1da7bbf (patch)
tree5b5752f570dffd870cfd76cbb08005a24425c6a9 /fs/posix_acl.c
parentea5aac6fae94bff4756051b0503f86e31ef6808b (diff)
parent4e1da8fe031303599e78f88e0dad9f44272e4f99 (diff)
downloadlinux-stable-91bc559d8d3aed488b4b50e9eba1d7ebb1da7bbf.tar.gz
linux-stable-91bc559d8d3aed488b4b50e9eba1d7ebb1da7bbf.tar.bz2
linux-stable-91bc559d8d3aed488b4b50e9eba1d7ebb1da7bbf.zip
Merge tag 'fs.acl.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping
Pull vfs acl update from Christian Brauner: "This contains a single update to the internal get acl method and replaces an open-coded cmpxchg() comparison with with try_cmpxchg(). It's clearer and also beneficial on some architectures" * tag 'fs.acl.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: posix_acl: Use try_cmpxchg in get_acl
Diffstat (limited to 'fs/posix_acl.c')
-rw-r--r--fs/posix_acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index fda167069617..5a76fb35923a 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -175,7 +175,7 @@ static struct posix_acl *__get_acl(struct mnt_idmap *idmap,
* Cache the result, but only if our sentinel is still in place.
*/
posix_acl_dup(acl);
- if (unlikely(cmpxchg(p, sentinel, acl) != sentinel))
+ if (unlikely(!try_cmpxchg(p, &sentinel, acl)))
posix_acl_release(acl);
return acl;
}