summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/acl.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-07-11 14:56:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-27 15:03:27 -0700
commit2907cdacb212a2a747282c72655f4d4f92d040e2 (patch)
treebbe2b60b332fdc11d93537676d1798deeba7f7fe /fs/f2fs/acl.c
parent39c18369f931163992a8ab91cb6a9caf75f70339 (diff)
downloadlinux-stable-2907cdacb212a2a747282c72655f4d4f92d040e2.tar.gz
linux-stable-2907cdacb212a2a747282c72655f4d4f92d040e2.tar.bz2
linux-stable-2907cdacb212a2a747282c72655f4d4f92d040e2.zip
f2fs: Don't clear SGID when inheriting ACLs
commit c925dc162f770578ff4a65ec9b08270382dba9e6 upstream. This patch copies commit b7f8a09f80: "btrfs: Don't clear SGID when inheriting ACLs" written by Jan. Fixes: 073931017b49d9458aa351605b43a7e34598caef Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/f2fs/acl.c')
-rw-r--r--fs/f2fs/acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index f12d5c5ecc31..bafe6df6016f 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -206,7 +206,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;