linux-stable/fs/ext4
Uros Bizjak 3ee2a3e7c1 fs/ext4: use try_cmpxchg in ext4_update_bh_state
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in
ext4_update_bh_state.  x86 CMPXCHG instruction returns success in ZF flag,
so this change saves a compare after cmpxchg (and related move instruction
in front of cmpxchg).

Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg
fails.  There is no need to re-read the value in the loop.

No functional change intended.

Link: https://lkml.kernel.org/r/20221102071147.6642-1-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-02-02 22:50:07 -08:00
..
.kunitconfig
acl.c fs: pass dentry to set acl method 2022-10-19 12:55:42 +02:00
acl.h fs: pass dentry to set acl method 2022-10-19 12:55:42 +02:00
balloc.c ext4: use ext4_debug() instead of jbd_debug() 2022-08-02 23:52:19 -04:00
bitmap.c
block_validity.c ext4: add ext4_sb_block_valid() refactored out of ext4_inode_block_valid() 2022-02-25 21:34:56 -05:00
crypto.c ext4: refactor and move ext4_ioctl_get_encryption_pwsalt() 2022-05-21 22:24:24 -04:00
dir.c ext4: fix spelling errors in comments 2022-05-11 15:19:06 -04:00
ext4.h ext4: switch to using ext4_do_writepages() for ordered data writeout 2022-12-08 21:49:25 -05:00
ext4_extents.h ext4: fix sparse warnings 2021-08-30 23:36:50 -04:00
ext4_jbd2.c ext4: split ext4_journal_start trace for debug 2022-12-01 10:46:54 -05:00
ext4_jbd2.h ext4: split ext4_journal_start trace for debug 2022-12-01 10:46:54 -05:00
extents.c ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline 2022-12-08 21:49:25 -05:00
extents_status.c ext4: fix reserved cluster accounting in __es_remove_extent() 2022-12-09 00:58:04 -05:00
extents_status.h
fast_commit.c jbd2: switch jbd2_submit_inode_data() to use fs-provided hook for data writeout 2022-12-08 21:49:25 -05:00
fast_commit.h ext4: add missing validation of fast-commit record lengths 2022-12-08 21:49:24 -05:00
file.c fs: rename current get acl method 2022-10-20 10:13:27 +02:00
fsmap.c
fsmap.h ext4: fsmap: fix the block/inode bitmap comment 2021-06-24 09:48:29 -04:00
fsync.c
hash.c unicode: clean up the Kconfig symbol confusion 2022-01-20 19:57:24 -05:00
ialloc.c A large number of cleanups and bug fixes, with many of the bug fixes 2022-12-12 19:56:37 -08:00
indirect.c ext4: fix error code return to user-space in ext4_get_branch() 2022-12-08 21:49:24 -05:00
inline.c fs/ext4: replace ternary operator with min()/max() and min_t() 2022-11-29 16:10:49 -05:00
inode-test.c
inode.c fs/ext4: use try_cmpxchg in ext4_update_bh_state 2023-02-02 22:50:07 -08:00
ioctl.c ext4: initialize quota before expanding inode in setproject ioctl 2022-12-08 22:03:15 -05:00
Kconfig
Makefile ext4: move ext4 crypto code to its own file crypto.c 2022-05-21 22:24:24 -04:00
mballoc.c ext4: make ext4_mb_initialize_context return void 2022-12-08 21:49:25 -05:00
mballoc.h ext4: use buckets for cr 1 block scan instead of rbtree 2022-09-21 22:12:03 -04:00
migrate.c ext4: fix warning in 'ext4_da_release_space' 2022-11-06 01:07:59 -04:00
mmp.c treewide: use get_random_u32_{above,below}() instead of manual loop 2022-11-18 02:15:22 +01:00
move_extent.c ext4: convert move_extent_per_page() to use folios 2022-11-30 15:59:02 -08:00
namei.c A large number of cleanups and bug fixes, with many of the bug fixes 2022-12-12 19:56:37 -08:00
orphan.c ext4: remove trailing newline from ext4_msg() message 2022-12-08 21:49:23 -05:00
page-io.c ext4: drop pointless IO submission from ext4_bio_write_page() 2022-12-08 21:49:25 -05:00
readpage.c fsverity updates for 6.2 2022-12-12 20:06:35 -08:00
resize.c ext4: fix corruption when online resizing a 1K bigalloc fs 2022-12-08 21:49:24 -05:00
super.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
symlink.c ext4: fix reading leftover inlined symlinks 2022-08-02 23:37:50 -04:00
sysfs.c unicode: clean up the Kconfig symbol confusion 2022-01-20 19:57:24 -05:00
truncate.h ext4: Convert to use mapping->invalidate_lock 2021-07-13 14:29:00 +02:00
verity.c fs: ext4: initialize fsdata in pagecache_write() 2022-12-08 21:49:25 -05:00
xattr.c ext4: fix inode leak in ext4_xattr_inode_create() on an error path 2022-12-09 00:57:01 -05:00
xattr.h ext4: remove EA inode entry from mbcache on inode eviction 2022-08-02 23:56:25 -04:00
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c