/* It's inline, so penalty for filesystems that don't use sticky bit is minimal.  */
static int check_sticky(struct inode *dir, struct inode *inode)
/* It's inline, so penalty for filesystems that don't use sticky bit is minimal.  */
static int check_sticky(struct inode *dir, struct inode *inode)
{
	uid_t fsuid = current_fsuid();
	if (!(dir->i_mode & S_ISVTX))
		return 0;
	if (inode->i_uid == fsuid)
		return 0;
	if (dir->i_uid == fsuid)
		return 0;
	return !capable(CAP_FOWNER);
}