Skip to content

Commit

Permalink
[XFS] Fix a possible metadata buffer (AGFL) refcount leak when fixing an
Browse files Browse the repository at this point in the history
AG freelist.

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

Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Nathan Scott committed May 8, 2006
1 parent b1ecdda commit e63a369
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/xfs/xfs_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1942,8 +1942,10 @@ xfs_alloc_fix_freelist(
/*
* 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;
}
/*
* Stop if we run out. Won't happen if callers are obeying
* the restrictions correctly. Can happen for free calls
Expand All @@ -1960,6 +1962,7 @@ xfs_alloc_fix_freelist(
return error;
}
}
xfs_trans_brelse(tp, agflbp);
args->agbp = agbp;
return 0;
}
Expand Down

0 comments on commit e63a369

Please sign in to comment.