diff options
author | Yang Xu <[email protected]> | 2022-07-14 14:11:28 +0800 |
---|---|---|
committer | Christian Brauner (Microsoft) <[email protected]> | 2022-07-21 11:34:16 +0200 |
commit | 5fadbd992996e9dda7ebcb62f5352866057bd619 (patch) | |
tree | 94c6360ad37cab925ad180055582ddddc41d1d42 | |
parent | 1639a49ccdce58ea248841ed9b23babcce6dbb0b (diff) |
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]>
-rw-r--r-- | fs/ceph/file.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index da59e836a06e..5a0266ea66ff 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -657,10 +657,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())); } |