/* if suid or (sgid and xgrp) remove privs  */
int should_remove_suid(struct dentry *dentry)
/* if suid or (sgid and xgrp) remove privs  */
int should_remove_suid(struct dentry *dentry)
{
	mode_t mode = dentry->d_inode->i_mode;
	int kill = 0;
	if (unlikely(mode & S_ISUID))
		kill = ATTR_KILL_SUID;
	if (unlikely((mode & S_ISGID) && (mode & S_IXGRP)))
		kill |= ATTR_KILL_SGID;
	if (unlikely(kill && !capable(CAP_FSETID) && S_ISREG(mode)))
		return kill;
	return 0;
}