[XFS] Fix a possible metadata buffer (AGFL) refcount leak when fixing an

AG freelist.

SGI-PV: 952681
SGI-Modid: xfs-linux-melb:xfs-kern:25902a

Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
Nathan Scott 2006-05-08 19:51:58 +10:00
parent b1ecdda931
commit e63a369001
1 changed files with 4 additions and 1 deletions

View File

@ -1942,8 +1942,10 @@ xfs_alloc_fix_freelist(
/* /*
* Allocate as many blocks as possible at once. * Allocate as many blocks as possible at once.
*/ */
if ((error = xfs_alloc_ag_vextent(&targs))) if ((error = xfs_alloc_ag_vextent(&targs))) {
xfs_trans_brelse(tp, agflbp);
return error; return error;
}
/* /*
* Stop if we run out. Won't happen if callers are obeying * Stop if we run out. Won't happen if callers are obeying
* the restrictions correctly. Can happen for free calls * the restrictions correctly. Can happen for free calls
@ -1960,6 +1962,7 @@ xfs_alloc_fix_freelist(
return error; return error;
} }
} }
xfs_trans_brelse(tp, agflbp);
args->agbp = agbp; args->agbp = agbp;
return 0; return 0;
} }