diff options
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index 7863a50d56f2..1865049e80f7 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c | |||
@@ -395,6 +395,8 @@ static void update_sm_ah(struct work_struct *work) | |||
395 | } | 395 | } |
396 | 396 | ||
397 | spin_lock_irq(&port->ah_lock); | 397 | spin_lock_irq(&port->ah_lock); |
398 | if (port->sm_ah) | ||
399 | kref_put(&port->sm_ah->ref, free_sm_ah); | ||
398 | port->sm_ah = new_ah; | 400 | port->sm_ah = new_ah; |
399 | spin_unlock_irq(&port->ah_lock); | 401 | spin_unlock_irq(&port->ah_lock); |
400 | 402 | ||