aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/readinode.c
diff options
context:
space:
mode:
authorKaiGai Kohei <kaigai@ak.jp.nec.com>2006-07-02 10:13:46 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-07-02 10:13:46 -0400
commitc7afb0f97700e73109564f83c35bfeeb14cb653b (patch)
treebd1c0f0e3b095e0dea15d569967a50703e05586e /fs/jffs2/readinode.c
parentc05d52c748da10a3f27f6e638875514153776b15 (diff)
[JFFS2][XATTR] Fix memory leak in POSIX-ACL support
jffs2_clear_acl() which releases acl caches allocated by kmalloc() was defined but it was never called. Thus, we faced to the risk of memory leaking. This patch plugs jffs2_clear_acl() into jffs2_do_clear_inode(). It ensures to release acl cache when inode is cleared. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index cc1899268c43..266423b2709d 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_clear_acl(f);
971 jffs2_xattr_delete_inode(c, f->inocache); 972 jffs2_xattr_delete_inode(c, f->inocache);
972 down(&f->sem); 973 down(&f->sem);
973 deleted = f->inocache && !f->inocache->nlink; 974 deleted = f->inocache && !f->inocache->nlink;