projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
posix_acl: Clear SGID bit when setting file permissions
[firefly-linux-kernel-4.4.55.git]
/
fs
/
ext2
/
acl.c
diff --git
a/fs/ext2/acl.c
b/fs/ext2/acl.c
index 27695e6f4e46629a8a888f38bcaf6f0e4ceaf1ec..d6aeb84e90b61acb8dff22443b9a9694c7ba3dba 100644
(file)
--- a/
fs/ext2/acl.c
+++ b/
fs/ext2/acl.c
@@
-193,15
+193,11
@@
ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
case ACL_TYPE_ACCESS:
name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
case ACL_TYPE_ACCESS:
name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
- error = posix_acl_
equiv_mode(acl, &inode->i_mode
);
- if (error
< 0
)
+ error = posix_acl_
update_mode(inode, &inode->i_mode, &acl
);
+ if (error)
return error;
return error;
- else {
- inode->i_ctime = CURRENT_TIME_SEC;
- mark_inode_dirty(inode);
- if (error == 0)
- acl = NULL;
- }
+ inode->i_ctime = CURRENT_TIME_SEC;
+ mark_inode_dirty(inode);
}
break;
}
break;