From c412fae756e10cce6f104965fe40766a08dd7e67 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 15 Oct 2003 22:44:24 -0500 Subject: [PATCH] [XFS] Fix inode btree lookup code precision problem with large allocation groups SGI Modid: 2.5.x-xfs:slinx:160092a --- fs/xfs/xfs_ialloc_btree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 20a21c56b25c8..804fc4bc3711f 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c @@ -30,7 +30,6 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" #include "xfs_macros.h" @@ -858,7 +857,7 @@ xfs_inobt_lookup( xfs_agblock_t agbno; /* a.g. relative btree block number */ xfs_agnumber_t agno; /* allocation group number */ xfs_inobt_block_t *block=NULL; /* current btree block */ - int diff; /* difference for the current key */ + __int64_t diff; /* difference for the current key */ int error; /* error return value */ int keyno=0; /* current key number */ int level; /* level in the btree */ @@ -883,7 +882,7 @@ xfs_inobt_lookup( */ for (level = cur->bc_nlevels - 1, diff = 1; level >= 0; level--) { xfs_buf_t *bp; /* buffer pointer for btree block */ - xfs_daddr_t d; /* disk address of btree block */ + xfs_daddr_t d; /* disk address of btree block */ /* * Get the disk address we're looking for. @@ -977,7 +976,8 @@ xfs_inobt_lookup( /* * Compute difference to get next direction. */ - diff = (int)startino - cur->bc_rec.i.ir_startino; + diff = (__int64_t) + startino - cur->bc_rec.i.ir_startino; /* * Less than, move right. */ -- 2.53.0