From: Jaegeuk Kim Date: Tue, 11 Jul 2017 21:56:49 +0000 (-0700) Subject: f2fs: Don't clear SGID when inheriting ACLs X-Git-Tag: C0P2-H0.0--20200415~8066 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=f97f9e94f666213b3cc59a6cff70b318154f2b09;p=linux.git 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 Reviewed-by: Chao Yu Reviewed-by: Jan Kara Signed-off-by: Jaegeuk Kim Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index 6fe23af509e1..55aa29c0c78d 100644 --- a/fs/f2fs/acl.c +++ b/fs/f2fs/acl.c @@ -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;