]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: refactor xfs_btree_diff_two_ptrs() to take advantage of cmp_int()
authorFedor Pchelkin <pchelkin@ispras.ru>
Wed, 2 Jul 2025 09:39:33 +0000 (12:39 +0300)
committerCarlos Maiolino <cem@kernel.org>
Thu, 24 Jul 2025 15:30:13 +0000 (17:30 +0200)
commitce6cce46aff79423f47680ee65e8f12191a50605
tree82200c45b0198f6502aead5df446eac6cd8b8e5a
parent2717eb35185581988799bb0d5179409978f36a90
xfs: refactor xfs_btree_diff_two_ptrs() to take advantage of cmp_int()

Use cmp_int() to yield the result of a three-way-comparison instead of
performing subtractions with extra casts. Thus also rename the function
to make its name clearer in purpose.

Found by Linux Verification Center (linuxtesting.org).

Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/scrub/btree.c