/* Returns 0 on success or -ENOMEM on error.  */
static int smack_sb_alloc_security(struct super_block *sb)
/* Returns 0 on success or -ENOMEM on error.  */
static int smack_sb_alloc_security(struct super_block *sb)
{
	struct superblock_smack *sbsp;
	sbsp = kzalloc(sizeof(struct superblock_smack), GFP_KERNEL);
	if (sbsp == NULL)
		return -ENOMEM;
	sbsp->smk_root = smack_known_floor.smk_known;
	sbsp->smk_default = smack_known_floor.smk_known;
	sbsp->smk_floor = smack_known_floor.smk_known;
	sbsp->smk_hat = smack_known_hat.smk_known;
	sbsp->smk_initialized = 0;
	spin_lock_init(&sbsp->smk_sblock);
	sb->s_security = sbsp;
	return 0;
}