xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 15 Jun 2012 08:39:05 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1339474826-10414-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1339474826-10414-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jun 12, 2012 at 02:20:26PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

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@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>