[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250825-lammfell-nagetiere-0a136b1acbe2@brauner>
Date: Mon, 25 Aug 2025 14:09:10 +0200
From: Christian Brauner <brauner@...nel.org>
To: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Uros Bizjak <ubizjak@...il.com>
Cc: Christian Brauner <brauner@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>
Subject: Re: [PATCH] fs: Use try_cmpxchg() in start_dir_add()
On Mon, 11 Aug 2025 14:52:38 +0200, Uros Bizjak wrote:
> 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.
>
> [...]
Applied to the vfs-6.18.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.18.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.18.misc
[1/1] fs: Use try_cmpxchg() in start_dir_add()
https://git.kernel.org/vfs/vfs/c/14498ca7e0f1
Powered by blists - more mailing lists