diff options
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r-- | fs/jffs2/acl.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index bc2693d56298..7ebacf14837f 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -233,22 +233,21 @@ 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; attr.ia_valid = ATTR_MODE | ATTR_CTIME; attr.ia_mode = mode; - attr.ia_ctime = CURRENT_TIME_SEC; + attr.ia_ctime = current_time(inode); rc = jffs2_do_setattr(inode, &attr); if (rc < 0) return rc; } - if (rc == 0) - acl = NULL; } break; case ACL_TYPE_DEFAULT: |