X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjffs2%2Facl.c;h=4c80404a9abae4b61e075135bb62441450596b11;hb=d67c6f869c0a7f275689855161c93d714197e052;hp=9728614b89588252431f83ffa454cd1bd89c020d;hpb=2024da603978882d102a34d47828a205fffb338e;p=linux-2.6 diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 9728614b89..4c80404a9a 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -176,7 +176,7 @@ static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct spin_unlock(&inode->i_lock); } -struct posix_acl *jffs2_get_acl(struct inode *inode, int type) +static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); struct posix_acl *acl; @@ -345,8 +345,10 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode) if (!clone) return -ENOMEM; rc = posix_acl_create_masq(clone, (mode_t *)i_mode); - if (rc < 0) + if (rc < 0) { + posix_acl_release(clone); return rc; + } if (rc > 0) jffs2_iset_acl(inode, &f->i_acl_access, clone); @@ -372,7 +374,7 @@ int jffs2_init_acl_post(struct inode *inode) return rc; } - return rc; + return 0; } void jffs2_clear_acl(struct jffs2_inode_info *f)