[PATCH 097/102] xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
Dave Chinner
david at fromorbit.com
Thu Aug 23 00:02:55 CDT 2012
From: Dave Chinner <dchinner at redhat.com>
Upstream commit: 76d095388b040229ea1aad7dea45be0cfa20f589
When we fail to find an matching extent near the requested extent
specification during a left-right distance search in
xfs_alloc_ag_vextent_near, we fail to free the original cursor that
we used to look up the XFS_BTNUM_CNT tree and hence leak it.
Reported-by: Chris J Arges <chris.j.arges at canonical.com>
Signed-off-by: Dave Chinner <dchinner at redhat.com>
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Ben Myers <bpm at sgi.com>
---
fs/xfs/xfs_alloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index 726418e..679c049 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -1087,6 +1087,7 @@ restart:
goto restart;
}
+ xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
trace_xfs_alloc_size_neither(args);
args->agbno = NULLAGBLOCK;
return 0;
--
1.7.10
More information about the xfs
mailing list