diff options
author | KaiGai Kohei <kaigai@ak.jp.nec.com> | 2006-06-23 20:15:36 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-06-27 11:18:30 -0400 |
commit | 355ed4e141203fd7266ef9d90d57be0c61bd1aa4 (patch) | |
tree | 24abb6d9ee1ae95e41d7db13f90200adf734eb4e /fs/jffs2/readinode.c | |
parent | 8a13695cbe4e8311b363f9bd25162904b984ca74 (diff) |
[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 <kaigai@ak.jp.nec.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r-- | fs/jffs2/readinode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 5fec012b02ed..cc1899268c43 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
@@ -968,6 +968,7 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f) | |||
968 | struct jffs2_full_dirent *fd, *fds; | 968 | struct jffs2_full_dirent *fd, *fds; |
969 | int deleted; | 969 | int deleted; |
970 | 970 | ||
971 | jffs2_xattr_delete_inode(c, f->inocache); | ||
971 | down(&f->sem); | 972 | down(&f->sem); |
972 | deleted = f->inocache && !f->inocache->nlink; | 973 | deleted = f->inocache && !f->inocache->nlink; |
973 | 974 | ||