/* Returns 0 if current can write the floor of the filesystem being mounted on, an error code otherwise.  */
static int smack_sb_mount(char *dev_name, struct path *path, char *type, unsigned long flags, void *data)
/* Returns 0 if current can write the floor of the filesystem being mounted on, an error code otherwise.  */
static int smack_sb_mount(char *dev_name, struct path *path, char *type, unsigned long flags, void *data)
{
	struct superblock_smack *sbp = path->mnt->mnt_sb->s_security;
	struct smk_audit_info ad;
	smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS);
	smk_ad_setfield_u_fs_path(&ad, *path);
	return smk_curacc(sbp->smk_floor, MAY_WRITE, &ad);
}