Skip to content

Commit 5fadbd9

Browse files
xuyang0410brauner
authored andcommitted
ceph: rely on vfs for setgid stripping
Now that we finished moving setgid stripping for regular files in setgid directories into the vfs, individual filesystem don't need to manually strip the setgid bit anymore. Drop the now unneeded code from ceph. Link: https://lore.kernel.org/r/1657779088-2242-4-git-send-email-xuyang2018.jy@fujitsu.com Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Christian Brauner (Microsoft)<brauner@kernel.org> Reviewed-and-Tested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
1 parent 1639a49 commit 5fadbd9

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

fs/ceph/file.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,6 @@ static int ceph_finish_async_create(struct inode *dir, struct dentry *dentry,
657657
/* Directories always inherit the setgid bit. */
658658
if (S_ISDIR(mode))
659659
mode |= S_ISGID;
660-
else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) &&
661-
!in_group_p(dir->i_gid) &&
662-
!capable_wrt_inode_uidgid(&init_user_ns, dir, CAP_FSETID))
663-
mode &= ~S_ISGID;
664660
} else {
665661
in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid()));
666662
}

0 commit comments

Comments
 (0)