Skip to content

Commit 2bda981

Browse files
committed
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
2 parents 912ad8b + ca3ac4b commit 2bda981

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ struct kmem_cache *xfs_extfree_item_cache;
3333

3434
struct workqueue_struct *xfs_alloc_wq;
3535

36-
#define XFS_ABSDIFF(a,b) (((a) <= (b)) ? ((b) - (a)) : ((a) - (b)))
37-
3836
#define XFSA_FIXUP_BNO_OK 1
3937
#define XFSA_FIXUP_CNT_OK 2
4038

@@ -410,8 +408,8 @@ xfs_alloc_compute_diff(
410408
if (newbno1 != NULLAGBLOCK && newbno2 != NULLAGBLOCK) {
411409
if (newlen1 < newlen2 ||
412410
(newlen1 == newlen2 &&
413-
XFS_ABSDIFF(newbno1, wantbno) >
414-
XFS_ABSDIFF(newbno2, wantbno)))
411+
abs_diff(newbno1, wantbno) >
412+
abs_diff(newbno2, wantbno)))
415413
newbno1 = newbno2;
416414
} else if (newbno2 != NULLAGBLOCK)
417415
newbno1 = newbno2;
@@ -427,7 +425,7 @@ xfs_alloc_compute_diff(
427425
} else
428426
newbno1 = freeend - wantlen;
429427
*newbnop = newbno1;
430-
return newbno1 == NULLAGBLOCK ? 0 : XFS_ABSDIFF(newbno1, wantbno);
428+
return newbno1 == NULLAGBLOCK ? 0 : abs_diff(newbno1, wantbno);
431429
}
432430

433431
/*

0 commit comments

Comments
 (0)