diff options
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r-- | fs/jffs2/acl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 2f7a3c090489..f9f86f87d32b 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c | |||
@@ -235,9 +235,10 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
235 | case ACL_TYPE_ACCESS: | 235 | case ACL_TYPE_ACCESS: |
236 | xprefix = JFFS2_XPREFIX_ACL_ACCESS; | 236 | xprefix = JFFS2_XPREFIX_ACL_ACCESS; |
237 | if (acl) { | 237 | if (acl) { |
238 | umode_t mode = inode->i_mode; | 238 | umode_t mode; |
239 | rc = posix_acl_equiv_mode(acl, &mode); | 239 | |
240 | if (rc < 0) | 240 | rc = posix_acl_update_mode(inode, &mode, &acl); |
241 | if (rc) | ||
241 | return rc; | 242 | return rc; |
242 | if (inode->i_mode != mode) { | 243 | if (inode->i_mode != mode) { |
243 | struct iattr attr; | 244 | struct iattr attr; |
@@ -249,8 +250,6 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
249 | if (rc < 0) | 250 | if (rc < 0) |
250 | return rc; | 251 | return rc; |
251 | } | 252 | } |
252 | if (rc == 0) | ||
253 | acl = NULL; | ||
254 | } | 253 | } |
255 | break; | 254 | break; |
256 | case ACL_TYPE_DEFAULT: | 255 | case ACL_TYPE_DEFAULT: |