The patch titled xfs: free temporary cursor in xfs_dialloc() has been added to the -mm tree. Its filename is xfs-free-temporary-cursor-in-xfs_dialloc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: xfs: free temporary cursor in xfs_dialloc() From: Eric Sandeen <sandeen@xxxxxxxxxxx> Commit bd169565993b39b9b4b102cdac8b13e0a259ce2f ("xfs: speed up free inode search") 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@xxxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Cc: Alex Elder <aelder@xxxxxxx> Cc: Felix Blyakher <felixb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN fs/xfs/xfs_ialloc.c~xfs-free-temporary-cursor-in-xfs_dialloc fs/xfs/xfs_ialloc.c --- a/fs/xfs/xfs_ialloc.c~xfs-free-temporary-cursor-in-xfs_dialloc +++ a/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; _ Patches currently in -mm which might be from sandeen@xxxxxxxxxxx are xfs-free-temporary-cursor-in-xfs_dialloc.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html