/* see if mkdir and create can be performed in the root directory  */
static int cachefiles_check_cache_dir(struct cachefiles_cache *cache, struct dentry *root)
/* see if mkdir and create can be performed in the root directory  */
static int cachefiles_check_cache_dir(struct cachefiles_cache *cache, struct dentry *root)
{
	int ret;
	ret = security_inode_mkdir(root->d_inode, root, 0);
	if (ret < 0) {
		printk(KERN_ERR "CacheFiles:"
		       " Security denies permission to make dirs: error %d",
		       ret);
		return ret;
	}
	ret = security_inode_create(root->d_inode, root, 0);
	if (ret < 0)
		printk(KERN_ERR "CacheFiles:"
		       " Security denies permission to create files: error %d",
		       ret);
	return ret;
}