IB/core: Free GID table entry during GID deletion
authorParav Pandit <parav@mellanox.com>
Thu, 21 Jun 2018 12:31:25 +0000 (15:31 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 Jun 2018 15:02:59 +0000 (09:02 -0600)
commit59d40813328f405976774662ddb530c6e9e9df52
treed6808a56db7c73a4e3645710f2a69b3a7c316f25
parent88145678924891bdb959010de20b1bb4f27542d5
IB/core: Free GID table entry during GID deletion

If we already hold the table->lock when doing the kref_put it means we are
in a context where it is safe to do the deletion synchronously, with no
need for the work queue.

This helps to eliminate issues when GID change is requested as part of MAC
address change or bonding event change where expectation is to replace the
GID almost immediately.

Fixes: b150c3862d21 ("IB/core: Introduce GID entry reference counts")
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cache.c