[JFFS2][XATTR] Fix memory leak in POSIX-ACL support * jffs2-xattr-v6.2-02-fix-posix_acl-memory-leak.patch 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 Thanks, KaiGai Kohei wrote: > David Woodhouse wrote: > >>On Thu, 2006-06-29 at 15:01 +0200, Adrian Bunk wrote: >> >> >>>it might not have been intended that jffs2_clear_acl() in Linus' tree >>>is unused? >> >> >>I suspect you're right -- thanks for pointing it out. >> >>Kaigai-san? > > > I'm sorry, it's a serious BUG. > When an inode is cleared, jffs2_clear_acl() should be called > to release on-memory ACL. Because the current implementation > didn't care about this cleaning-up, we have memory-leaking. > > Please wait a patch for a while. > > Thanks, -- KaiGai Kohei