/* This function is required to be called in order for the file to be removed. No automatic cleanup of files will happen when a module is removed; you are responsible here.  */
void securityfs_remove(struct dentry *dentry)
/* This function is required to be called in order for the file to be removed. No automatic cleanup of files will happen when a module is removed; you are responsible here.  */
void securityfs_remove(struct dentry *dentry)
{
	struct dentry *parent;
	if (!dentry || IS_ERR(dentry))
		return;
	parent = dentry->d_parent;
	if (!parent || !parent->d_inode)
		return;
	mutex_lock(&parent->d_inode->i_mutex);
	if (positive(dentry)) {
		if (dentry->d_inode) {
			if (S_ISDIR(dentry->d_inode->i_mode))
				simple_rmdir(parent->d_inode, dentry);
			else
				simple_unlink(parent->d_inode, dentry);
			dput(dentry);
		}
	}
	mutex_unlock(&parent->d_inode->i_mutex);
	simple_release_fs(&mount, &mount_count);
}