| To: | xfs-dev <xfs-dev@xxxxxxx> |
|---|---|
| Subject: | [patch] fix inode leak in xfs_iget_core() |
| From: | David Chinner <dgc@xxxxxxx> |
| Date: | Sat, 23 Feb 2008 17:19:24 +1100 |
| Cc: | xfs-oss <xfs@xxxxxxxxxxx> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.2.1i |
If the radix_tree_preload() fails, we need to destroy the
inode we just read in before trying again. This could leak
xfs_vnode structures when there is memory pressure. Noticed
by Christoph Hellwig.
Signed-off-by: Dave Chinner <dgc@xxxxxxx>
---
fs/xfs/xfs_iget.c | 1 +
1 file changed, 1 insertion(+)
Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2008-02-15 19:27:02.000000000
+1100
+++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2008-02-23 16:51:31.602711856 +1100
@@ -232,6 +232,7 @@ finish_inode:
* write spinlock.
*/
if (radix_tree_preload(GFP_KERNEL)) {
+ xfs_idestroy(ip);
delay(1);
goto again;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [REVIEW] Add lazy-counter conversion to xfs_repair, David Chinner |
|---|---|
| Next by Date: | Re: [patch] fix inode leak in xfs_iget_core(), Christoph Hellwig |
| Previous by Thread: | Is the bellow panic is a XFS bug ?, Raz |
| Next by Thread: | Re: [patch] fix inode leak in xfs_iget_core(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |