xfs: refactor ->diff_two_keys callsites
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:10 +0000 (19:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:10 +0000 (19:00 -0700)
commitbd7e795108ccd8d0f3dc34e16957cbba7e89f342
tree626a73a314584b8b417c3cbee096536c0e1c9f7e
parentee5fe8ff6d19b35e7547af789cba877dbf04517b
xfs: refactor ->diff_two_keys callsites

Create wrapper functions around ->diff_two_keys so that we don't have to
remember what the return values mean, and adjust some of the code
comments to reflect the longtime code behavior.  We're going to
introduce more uses of ->diff_two_keys in the next patch, so reduce the
cognitive load for readers by doing this refactoring now.

Suggested-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/scrub/btree.c