From cb4deb22fb25e3908b4f266908e691b75c12b9f7 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 18 May 2006 15:51:18 +0000 Subject: [PATCH] Fix buffer refcount leak on an AGFL buffer. Merge of master-melb:xfs-cmds:25966a by kenmcd. --- libxfs/xfs_alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 0e5699fb1..d0e2d846b 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -1849,8 +1849,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 @@ -1867,6 +1869,7 @@ xfs_alloc_fix_freelist( return error; } } + xfs_trans_brelse(tp, agflbp); args->agbp = agbp; return 0; } -- 2.47.2