]> git.baikalelectronics.ru Git - kernel.git/commit
s390/css: validate subchannel prior to allocation
authorSebastian Ott <sebott@linux.ibm.com>
Mon, 25 Jun 2018 09:23:26 +0000 (11:23 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 17 Jul 2018 05:27:54 +0000 (07:27 +0200)
commitb4c56872a2024725622f241b870dcea92a7a97f2
tree5678caf88c1ae544b4f3f81f4cdc8332d0ba19b5
parentfc6e1e4ebf3c2e2a8329a4b049418b0cd0c46f08
s390/css: validate subchannel prior to allocation

In css_alloc_subchannel we allocate the subchannel and do a
validation of the subchannel (to decide if we should look for
devices via this subchannel). On a typical LPAR we find lots
of subchannels to be invalid (because there is no device
attached or the device is blacklisted) leading to lots of
useless kmalloc and kfree calls.

This patch changes the order to only allocate the subchannels
that have been found valid.

Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cio.c
drivers/s390/cio/cio.h
drivers/s390/cio/css.c