]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: make ib_device.add method optional
authorSagi Grimberg <sagi@grimberg.me>
Sun, 2 Jul 2017 08:20:50 +0000 (11:20 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 18 Aug 2017 14:46:20 +0000 (10:46 -0400)
commit6b996e425cb904a4a81f4f7648e41beba4a0fbd3
treee58b6184b0592e79383f4f28f9f0550a9c96f037
parentbe06e93d9c973e2381f02739a4ed09045a97b92e
RDMA/core: make ib_device.add method optional

ib_clients can indeed fill .add to NULL, but then they will not see
any device removal notifications. The reason is that that
ib_register_client and ib_register_device checked existence of .add
before adding the creating a corresponding client_data and adding
it to the list. Simple condition reverse fixes the issue.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/device.c