diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 943655e36a79987e6eed8e9eab3f9362b70a5625..aa05b4a07e2668cbd23254194699f6b648a53a55 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -620,10 +620,6 @@ static int ceph_finish_async_create(struct inode *dir, struct dentry *dentry, /* Directories always inherit the setgid bit. */ if (S_ISDIR(mode)) mode |= S_ISGID; - else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) && - !in_group_p(dir->i_gid) && - !capable_wrt_inode_uidgid(dir, CAP_FSETID)) - mode &= ~S_ISGID; } else { in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid())); }