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/[email protected] Reviewed-by: Xiubo Li <[email protected]> Reviewed-by: Christian Brauner (Microsoft)<[email protected]> Reviewed-and-Tested-by: Jeff Layton <[email protected]> Signed-off-by: Yang Xu <[email protected]> Signed-off-by: Christian Brauner (Microsoft) <[email protected]>
1 parent 1639a49 commit 5fadbd9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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)