Commit 53e5cd28 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Kleber Sacilotto de Souza

f2fs: Don't clear SGID when inheriting ACLs

BugLink: http://bugs.launchpad.net/bugs/1707233

commit c925dc16 upstream.

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

Fixes: 07393101Signed-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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent d30f3850
...@@ -213,7 +213,7 @@ static int __f2fs_set_acl(struct inode *inode, int type, ...@@ -213,7 +213,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