/* This function is used when filesystem needs to initialize quotas during mount time.  */
int vfs_quota_on_mount(struct super_block *sb, char *qf_name, int format_id, int type)
/* This function is used when filesystem needs to initialize quotas during mount time.  */
int vfs_quota_on_mount(struct super_block *sb, char *qf_name, int format_id, int type)
{
	struct dentry *dentry;
	int error;
	mutex_lock(&sb->s_root->d_inode->i_mutex);
	dentry = lookup_one_len(qf_name, sb->s_root, strlen(qf_name));
	mutex_unlock(&sb->s_root->d_inode->i_mutex);
	if (IS_ERR(dentry))
		return PTR_ERR(dentry);
	if (!dentry->d_inode) {
		error = -ENOENT;
		goto out;
	}
	error = security_quota_on(dentry);
	if (!error)
		error = vfs_load_quota_inode(dentry->d_inode, type, format_id,
				DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
out:
	dput(dentry);
	return error;
}