]> 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>
Fri, 16 Dec 2011 04:49:29 +0000 (15:49 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Dec 2011 06:00:07 +0000 (17:00 +1100)
commitf63d8843f18d65f5dd7ce4e521c5775b6142ec9b
tree452da45edcb903c9b547a111d08752a49c712a09
parente2a6bd465cb921e38472890a9441c23f96e8a7cc
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