From: David Chinner <dgc@sgi.com>
To: xfs-dev <xfs-dev@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [patch] fix inode leak in xfs_iget_core()
Date: Sat, 23 Feb 2008 17:19:24 +1100 [thread overview]
Message-ID: <20080223061924.GI155259@sgi.com> (raw)
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@sgi.com>
---
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;
}
next reply other threads:[~2008-02-23 6:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 6:19 David Chinner [this message]
2008-02-23 9:22 ` [patch] fix inode leak in xfs_iget_core() Christoph Hellwig
2008-03-03 4:04 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080223061924.GI155259@sgi.com \
--to=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.