All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 3/3] ceph: Remove S_ISGID clear code in ceph_finish_async_create
@ 2022-03-28  9:58 Yang Xu
  0 siblings, 0 replies; only message in thread
From: Yang Xu @ 2022-03-28  9:58 UTC (permalink / raw)
  To: linux-fsdevel, ceph-devel; +Cc: viro, david, jlayton, Yang Xu

Since vfs has stripped S_ISGID, we don't need this code any more.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 fs/ceph/file.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index bbed3224ad68..f69dafabb65b 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(&init_user_ns, dir, CAP_FSETID))
-			mode &= ~S_ISGID;
 	} else {
 		in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid()));
 	}
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-28  9:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  9:58 [PATCH v1 3/3] ceph: Remove S_ISGID clear code in ceph_finish_async_create Yang Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.