From 355ed4e141203fd7266ef9d90d57be0c61bd1aa4 Mon Sep 17 00:00:00 2001 From: KaiGai Kohei Date: Sat, 24 Jun 2006 09:15:36 +0900 Subject: [JFFS2][XATTR] Fix memory leak with jffs2_xattr_ref If xattr_ref is associated with an orphan inode_cache on filesystem mounting, those xattr_refs are not released even if this inode_cache is released. This patch enables to call jffs2_xattr_delete_inode() for such a irregular inode_cachde too. Signed-off-by: KaiGai Kohei Signed-off-by: David Woodhouse --- fs/jffs2/nodelist.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/jffs2/nodelist.c') diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index 927dfe42ba7..7675b33396c 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -906,6 +906,9 @@ void jffs2_del_ino_cache(struct jffs2_sb_info *c, struct jffs2_inode_cache *old) { struct jffs2_inode_cache **prev; +#ifdef CONFIG_JFFS2_FS_XATTR + BUG_ON(old->xref); +#endif dbg_inocache("del %p (ino #%u)\n", old, old->ino); spin_lock(&c->inocache_lock); -- cgit v1.2.3