projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50b1972
)
IB/hfi1: fix a locking bug
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 16 Sep 2015 06:22:51 +0000
(09:22 +0300)
committer
Doug Ledford
<dledford@redhat.com>
Fri, 18 Sep 2015 15:28:47 +0000
(11:28 -0400)
mutex_trylock() returns zero on failure, not EBUSY.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/chip.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/rdma/hfi1/chip.c
b/drivers/staging/rdma/hfi1/chip.c
index 654eafef1d30857ead08805911ba71797027028b..aa58e597df0698a4dc3e17d04662f565a5bafbbc 100644
(file)
--- a/
drivers/staging/rdma/hfi1/chip.c
+++ b/
drivers/staging/rdma/hfi1/chip.c
@@
-2710,7
+2710,7
@@
int acquire_lcb_access(struct hfi1_devdata *dd, int sleep_ok)
if (sleep_ok) {
mutex_lock(&ppd->hls_lock);
} else {
- while (
mutex_trylock(&ppd->hls_lock) == EBUSY
)
+ while (
!mutex_trylock(&ppd->hls_lock)
)
udelay(1);
}
@@
-2758,7
+2758,7
@@
int release_lcb_access(struct hfi1_devdata *dd, int sleep_ok)
if (sleep_ok) {
mutex_lock(&dd->pport->hls_lock);
} else {
- while (
mutex_trylock(&dd->pport->hls_lock) == EBUSY
)
+ while (
!mutex_trylock(&dd->pport->hls_lock)
)
udelay(1);
}