[PATCH] xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
Christoph Hellwig
hch at infradead.org
Fri Jun 15 07:39:05 CDT 2012
On Tue, Jun 12, 2012 at 02:20:26PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> 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>
Looks correct for now, but mid-term this function absolutely needs
a restructuring with good exit labels and a posisble a split up into
multiple helpers.
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list