projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44acdcf
)
mutex: fix double unlock in fio_mutex_down_timeout()
author
Jens Axboe
<axboe@fb.com>
Thu, 21 Jan 2016 04:52:47 +0000
(21:52 -0700)
committer
Jens Axboe
<axboe@fb.com>
Thu, 21 Jan 2016 04:52:47 +0000
(21:52 -0700)
In case of error, we unlock twice.
Fixes:
09400a60042e
("mutex: fixup fio_mutex_down_timeout()")
Signed-off-by: Jens Axboe <axboe@fb.com>
mutex.c
patch
|
blob
|
blame
|
history
diff --git
a/mutex.c
b/mutex.c
index a48e37d0f11a947efbdcb6a278c59b82b58b3372..16107dd4e5ca796701733354e31e95d5e0c9ae83 100644
(file)
--- a/
mutex.c
+++ b/
mutex.c
@@
-136,6
+136,7
@@
int fio_mutex_down_timeout(struct fio_mutex *mutex, unsigned int msecs)
if (!ret) {
mutex->value--;
pthread_mutex_unlock(&mutex->lock);
+ return 0;
}
pthread_mutex_unlock(&mutex->lock);