Commit e216aeea authored by Nathan Scott's avatar Nathan Scott Committed by Nathan Scott

[XFS] Fix signed/unsigned issues in xfs_reserve_blocks routine.

SGI Modid: xfs-linux:xfs-kern:174873a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 7b5ad0c5
......@@ -507,7 +507,7 @@ xfs_reserve_blocks(
__uint64_t *inval,
xfs_fsop_resblks_t *outval)
{
__uint64_t lcounter, delta;
__int64_t lcounter, delta;
__uint64_t request;
unsigned long s;
......@@ -536,8 +536,7 @@ xfs_reserve_blocks(
mp->m_resblks = request;
} else {
delta = request - mp->m_resblks;
lcounter = mp->m_sb.sb_fdblocks;
lcounter -= delta;
lcounter = mp->m_sb.sb_fdblocks - delta;
if (lcounter < 0) {
/* We can't satisfy the request, just get what we can */
mp->m_resblks += mp->m_sb.sb_fdblocks;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment