Commit c925dc16 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: Don't clear SGID when inheriting ACLs

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

Fixes: 07393101
CC: stable@vger.kernel.org
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 5ffff285
...@@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type, ...@@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
switch (type) { switch (type) {
case ACL_TYPE_ACCESS: case ACL_TYPE_ACCESS:
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS; name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) { if (acl && !ipage) {
error = posix_acl_update_mode(inode, &inode->i_mode, &acl); error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
if (error) if (error)
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment