Re: [PATCH v2 1/3] mm: vmalloc: Avoid of calling __find_vmap_area() twise in __vunmap()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A sorry.  I need more coffee, this is not the cover letter, but the
patch that introduceѕ find_unlink_vmap_area.

> -	spin_lock(&vmap_area_lock);
> -	unlink_va(va, &vmap_area_root);
> -	spin_unlock(&vmap_area_lock);
> +	if (!list_empty(&va->list)) {
> +		spin_lock(&vmap_area_lock);
> +		unlink_va(va, &vmap_area_root);
> +		spin_unlock(&vmap_area_lock);
> +	}

As mentioned before, I'd much rather move this into the callers.

> +	va = find_unlink_vmap_area((unsigned long) addr);
> +	return __remove_vm_area(va);

This can drop the va local variable now.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux