mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 07:10:51 +07:00
xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
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@canonical.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
parent
9a3a5dab63
commit
76d095388b
@ -1080,6 +1080,7 @@ xfs_alloc_ag_vextent_near(
|
||||
goto restart;
|
||||
}
|
||||
|
||||
xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
|
||||
trace_xfs_alloc_size_neither(args);
|
||||
args->agbno = NULLAGBLOCK;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user