projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a4f139
)
mlx5: Fix error flow in add_keys
author
Eli Cohen
<eli@dev.mellanox.co.il>
Tue, 2 Dec 2014 10:26:19 +0000
(12:26 +0200)
committer
David S. Miller
<davem@davemloft.net>
Tue, 9 Dec 2014 01:45:56 +0000
(20:45 -0500)
If mlx5_core_create_mkey fails, decrease the pending counter to undo the
previous increment.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx5/mr.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/hw/mlx5/mr.c
b/drivers/infiniband/hw/mlx5/mr.c
index 4c89b64aa9cfb1528a1ba9ad34a43bc07ea3ea97..5a80dd9937612f5804d64135838ff389570e6b6e 100644
(file)
--- a/
drivers/infiniband/hw/mlx5/mr.c
+++ b/
drivers/infiniband/hw/mlx5/mr.c
@@
-159,6
+159,9
@@
static int add_keys(struct mlx5_ib_dev *dev, int c, int num)
sizeof(*in), reg_mr_callback,
mr, &mr->out);
if (err) {
+ spin_lock_irq(&ent->lock);
+ ent->pending--;
+ spin_unlock_irq(&ent->lock);
mlx5_ib_warn(dev, "create mkey failed %d\n", err);
kfree(mr);
break;