f2fs: Don't clear SGID when inheriting ACLs

This patch copies commit b7f8a09f80:
"btrfs: Don't clear SGID when inheriting ACLs" written by Jan.

Fixes: 073931017b
CC: [email protected]
Signed-off-by: Jan Kara <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
This commit is contained in:
Jaegeuk Kim 2017-07-11 14:56:49 -07:00
commit c925dc162f

View file

@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
switch (type) {
case ACL_TYPE_ACCESS:
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
if (acl && !ipage) {
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
if (error)
return error;