diff options
author | Nathan Scott <nathans@sgi.com> | 2006-05-08 19:51:58 +1000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-05-08 19:51:58 +1000 |
commit | e63a3690013a475746ad2cea998ebb534d825704 (patch) | |
tree | b16e8c504f2b6137b7419c601da10180d6df09a2 /fs/xfs/xfs_alloc.c | |
parent | b1ecdda9313ec5d2f971993f44f6b657acf70cff (diff) | |
download | op-kernel-dev-e63a3690013a475746ad2cea998ebb534d825704.zip op-kernel-dev-e63a3690013a475746ad2cea998ebb534d825704.tar.gz |
[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>
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 64ee07d..8558226 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -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 @@ -1960,6 +1962,7 @@ xfs_alloc_fix_freelist( return error; } } + xfs_trans_brelse(tp, agflbp); args->agbp = agbp; return 0; } |