X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjffs2%2Facl.c;h=4c80404a9abae4b61e075135bb62441450596b11;hb=02cbe4749a79f880b29ce42bbb5441b8d57222e4;hp=77fc5838609ce3d3a3246abdeb8910ab593f782a;hpb=95b00786f3b8fa99f53931361beeb4c10504ad87;p=linux-2.6-omap-h63xx.git diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 77fc5838609..4c80404a9ab 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);