summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2009-10-30 09:27:07 +0100
committerhch@lst.de <Christoph Hellwig>2009-10-30 09:27:07 +0100
commit3b826386d376e5545d2e92b2da5ebd965cafae97 (patch)
tree50c017ab5f90a70878291b33c331004b36437cce /fs/xfs/xfs_ialloc.c
parentMerge branch 'master' of ssh://oss.sgi.com/oss/git/xfs/xfs into for-linus (diff)
downloadlinux-3b826386d376e5545d2e92b2da5ebd965cafae97.tar.xz
linux-3b826386d376e5545d2e92b2da5ebd965cafae97.zip
xfs: free temporary cursor in xfs_dialloc
Commit bd169565993b39b9b4b102cdac8b13e0a259ce2f seems to have a slight regression where this code path: if (!--searchdistance) { /* * Not in range - save last search * location and allocate a new inode */ ... goto newino; } doesn't free the temporary cursor (tcur) that got dup'd in this function. This leaks an item in the xfs_btree_cur zone, and it's caught on module unload: =========================================================== BUG xfs_btree_cur: Objects remaining on kmem_cache_close() ----------------------------------------------------------- It seems like maybe a single free at the end of the function might be cleaner, but for now put a del_cursor right in this code block similar to the handling in the rest of the function. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index ab64f3efb43b..0785797db828 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -880,6 +880,7 @@ nextag:
* Not in range - save last search
* location and allocate a new inode
*/
+ xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR);
pag->pagl_leftrec = trec.ir_startino;
pag->pagl_rightrec = rec.ir_startino;
pag->pagl_pagino = pagino;