/* vma is the first one with address < vma->vm_start. Have to extend vma.  */
static int expand_downwards(struct vm_area_struct *vma, unsigned long address)
/* vma is the first one with address < vma->vm_start. Have to extend vma.  */
static int expand_downwards(struct vm_area_struct *vma, unsigned long address)
{
	int error;
	if (unlikely(anon_vma_prepare(vma)))
		return -ENOMEM;
	address &= PAGE_MASK;
	error = security_file_mmap(NULL, 0, 0, 0, address, 1);
	if (error)
		return error;
	anon_vma_lock(vma);
	if (address < vma->vm_start) {
		unsigned long size, grow;
		size = vma->vm_end - address;
		grow = (vma->vm_start - address) >> PAGE_SHIFT;
		error = acct_stack_growth(vma, size, grow);
		if (!error) {
			vma->vm_start = address;
			vma->vm_pgoff -= grow;
		}
	}
	anon_vma_unlock(vma);
	return error;
}