X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=fs%2Fjffs2%2Facl.c;h=7ebacf14837fd8ed1d47d1eec3f753e546de22bc;hp=8fd0a7845d88ec29ebe5476b0005ba66f7c68847;hb=101105b1717f536ca741f940033996302d4ef191;hpb=3873691e5ab34fa26948643d038a2b98c4437298 diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 8fd0a7845d88..7ebacf14837f 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -233,9 +233,10 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) case ACL_TYPE_ACCESS: xprefix = JFFS2_XPREFIX_ACL_ACCESS; if (acl) { - umode_t mode = inode->i_mode; - rc = posix_acl_equiv_mode(acl, &mode); - if (rc < 0) + umode_t mode; + + rc = posix_acl_update_mode(inode, &mode, &acl); + if (rc) return rc; if (inode->i_mode != mode) { struct iattr attr; @@ -247,8 +248,6 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) if (rc < 0) return rc; } - if (rc == 0) - acl = NULL; } break; case ACL_TYPE_DEFAULT: