aboutsummaryrefslogtreecommitdiffstats
path: root/fs/generic_acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/generic_acl.c')
-rw-r--r--fs/generic_acl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/generic_acl.c b/fs/generic_acl.c
index 2dd434d6ff29..d0dddaceac59 100644
--- a/fs/generic_acl.c
+++ b/fs/generic_acl.c
@@ -82,18 +82,14 @@ generic_acl_set(struct dentry *dentry, const char *name, const void *value,
82 return PTR_ERR(acl); 82 return PTR_ERR(acl);
83 } 83 }
84 if (acl) { 84 if (acl) {
85 mode_t mode;
86
87 error = posix_acl_valid(acl); 85 error = posix_acl_valid(acl);
88 if (error) 86 if (error)
89 goto failed; 87 goto failed;
90 switch (type) { 88 switch (type) {
91 case ACL_TYPE_ACCESS: 89 case ACL_TYPE_ACCESS:
92 mode = inode->i_mode; 90 error = posix_acl_equiv_mode(acl, &inode->i_mode);
93 error = posix_acl_equiv_mode(acl, &mode);
94 if (error < 0) 91 if (error < 0)
95 goto failed; 92 goto failed;
96 inode->i_mode = mode;
97 inode->i_ctime = CURRENT_TIME; 93 inode->i_ctime = CURRENT_TIME;
98 if (error == 0) { 94 if (error == 0) {
99 posix_acl_release(acl); 95 posix_acl_release(acl);