diff options
| -rw-r--r-- | fs/generic_acl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/generic_acl.c b/fs/generic_acl.c index 21408084c..451654d6d 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c @@ -82,14 +82,19 @@ generic_acl_set(struct dentry *dentry, const char *name, const void *value, return PTR_ERR(acl); } if (acl) { + struct posix_acl *old_acl; + error = posix_acl_valid(acl); if (error) goto failed; switch (type) { case ACL_TYPE_ACCESS: + old_acl = acl; error = posix_acl_update_mode(inode, &inode->i_mode, &acl); if (error) goto failed; + if (!acl) + posix_acl_release(old_acl); inode->i_ctime = CURRENT_TIME; break; case ACL_TYPE_DEFAULT: |
