]> git.baikalelectronics.ru Git - kernel.git/commit
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path
authorKautuk Consul <consul.kautuk@gmail.com>
Fri, 13 Jan 2012 01:20:08 +0000 (17:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 04:13:10 +0000 (20:13 -0800)
commitf41eb93b5efa083f57096be7b4a4795687d1f7b0
tree4104640edda22dad55c1db4d828ba21bfd0b4b85
parent5e9b7e54a77547455c8bb4ddaba63a601fb71a93
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.

[akpm@linux-foundation.org: remove now-unneeded tests]
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmalloc.c