diff options
author | KaiGai Kohei <kaigai@ak.jp.nec.com> | 2006-07-02 10:13:46 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-07-02 10:13:46 -0400 |
commit | c7afb0f97700e73109564f83c35bfeeb14cb653b (patch) | |
tree | bd1c0f0e3b095e0dea15d569967a50703e05586e /fs/jffs2/acl.h | |
parent | c05d52c748da10a3f27f6e638875514153776b15 (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/acl.h')
-rw-r--r-- | fs/jffs2/acl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/acl.h b/fs/jffs2/acl.h index 8893bd1a6ba7..fa327dbd3171 100644 --- a/fs/jffs2/acl.h +++ b/fs/jffs2/acl.h | |||
@@ -30,7 +30,7 @@ struct jffs2_acl_header { | |||
30 | extern int jffs2_permission(struct inode *, int, struct nameidata *); | 30 | extern int jffs2_permission(struct inode *, int, struct nameidata *); |
31 | extern int jffs2_acl_chmod(struct inode *); | 31 | extern int jffs2_acl_chmod(struct inode *); |
32 | extern int jffs2_init_acl(struct inode *, struct inode *); | 32 | extern int jffs2_init_acl(struct inode *, struct inode *); |
33 | extern void jffs2_clear_acl(struct inode *); | 33 | extern void jffs2_clear_acl(struct jffs2_inode_info *); |
34 | 34 | ||
35 | extern struct xattr_handler jffs2_acl_access_xattr_handler; | 35 | extern struct xattr_handler jffs2_acl_access_xattr_handler; |
36 | extern struct xattr_handler jffs2_acl_default_xattr_handler; | 36 | extern struct xattr_handler jffs2_acl_default_xattr_handler; |
@@ -40,6 +40,6 @@ extern struct xattr_handler jffs2_acl_default_xattr_handler; | |||
40 | #define jffs2_permission NULL | 40 | #define jffs2_permission NULL |
41 | #define jffs2_acl_chmod(inode) (0) | 41 | #define jffs2_acl_chmod(inode) (0) |
42 | #define jffs2_init_acl(inode,dir) (0) | 42 | #define jffs2_init_acl(inode,dir) (0) |
43 | #define jffs2_clear_acl(inode) | 43 | #define jffs2_clear_acl(f) |
44 | 44 | ||
45 | #endif /* CONFIG_JFFS2_FS_POSIX_ACL */ | 45 | #endif /* CONFIG_JFFS2_FS_POSIX_ACL */ |