]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path
authorKautuk Consul <consul.kautuk@gmail.com>
Thu, 8 Dec 2011 04:32:09 +0000 (15:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Dec 2011 04:18:46 +0000 (15:18 +1100)
commit94988cd4ab33408eb7093c6c5f49b50809df16eb
treec5963a54c667fb21d88fde0343a2ea1a08746aab
parentd97f5ee617a4ce0581e180a4ca3f2f1d57d69ee7
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path

If either of the vas or vms arrays are not properly kzalloced, then the
code jumps to the err_free label.

The err_free label runs a loop to check and free each of the array members
of the vas and vms arrays which is not required for this situation as none
of the array members have been allocated till this point.

Eliminate the extra loop we have to go through by introducing a new label
err_free2 and then jumping to it.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c