]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/ceph/file.c
Merge tag 'fs.setgid.v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner...
[people/ms/linux.git] / fs / ceph / file.c
index 8fab5db16c738a6c365f746e21f702bc4bd2208b..284d2fda663deb8b4a20c9edcfb03d2dd78bd7c8 100644 (file)
@@ -656,10 +656,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(&init_user_ns, dir, CAP_FSETID))
-                       mode &= ~S_ISGID;
        } else {
                in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid()));
        }