summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-03-14 13:21:31 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2025-03-14 13:21:31 -1000
commit2bda981bd5dddf9fc42c0cbcff6549230bbb520b (patch)
tree5bf2693864ac0fb7e28ffea65cea8c3e80d6df81 /fs
parent912ad8b317fafbb5a08fc0d9c23cf46af39ec2a7 (diff)
parentca3ac4bf4dc307cea5781dccccf41c1d14c2f82f (diff)
downloadlinux-2bda981bd5dddf9fc42c0cbcff6549230bbb520b.tar.gz
linux-2bda981bd5dddf9fc42c0cbcff6549230bbb520b.tar.bz2
linux-2bda981bd5dddf9fc42c0cbcff6549230bbb520b.zip
Merge tag 'xfs-fixes-6.14-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs cleanup from Carlos Maiolino: "Use abs_diff instead of XFS_ABSDIFF" * tag 'xfs-fixes-6.14-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Use abs_diff instead of XFS_ABSDIFF
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index 3d33e17f2e5c..7839efe050bf 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -33,8 +33,6 @@ struct kmem_cache *xfs_extfree_item_cache;
struct workqueue_struct *xfs_alloc_wq;
-#define XFS_ABSDIFF(a,b) (((a) <= (b)) ? ((b) - (a)) : ((a) - (b)))
-
#define XFSA_FIXUP_BNO_OK 1
#define XFSA_FIXUP_CNT_OK 2
@@ -410,8 +408,8 @@ xfs_alloc_compute_diff(
if (newbno1 != NULLAGBLOCK && newbno2 != NULLAGBLOCK) {
if (newlen1 < newlen2 ||
(newlen1 == newlen2 &&
- XFS_ABSDIFF(newbno1, wantbno) >
- XFS_ABSDIFF(newbno2, wantbno)))
+ abs_diff(newbno1, wantbno) >
+ abs_diff(newbno2, wantbno)))
newbno1 = newbno2;
} else if (newbno2 != NULLAGBLOCK)
newbno1 = newbno2;
@@ -427,7 +425,7 @@ xfs_alloc_compute_diff(
} else
newbno1 = freeend - wantlen;
*newbnop = newbno1;
- return newbno1 == NULLAGBLOCK ? 0 : XFS_ABSDIFF(newbno1, wantbno);
+ return newbno1 == NULLAGBLOCK ? 0 : abs_diff(newbno1, wantbno);
}
/*