projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d4e9d0
)
drbd: Fix test of unsigned in _drbd_fault_random()
author
Roel Kluin
<roel.kluin@gmail.com>
Tue, 15 Dec 2009 21:55:44 +0000
(22:55 +0100)
committer
Philipp Reisner
<philipp.reisner@linbit.com>
Mon, 21 Dec 2009 12:37:29 +0000
(13:37 +0100)
rsp->count is unsigned so the test does not work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
drivers/block/drbd/drbd_main.c
patch
|
blob
|
history
diff --git
a/drivers/block/drbd/drbd_main.c
b/drivers/block/drbd/drbd_main.c
index
af30ca9
..
ecc1612
100644
(file)
--- a/
drivers/block/drbd/drbd_main.c
+++ b/
drivers/block/drbd/drbd_main.c
@@
-3623,7
+3623,7
@@
_drbd_fault_random(struct fault_random_state *rsp)
{
long refresh;
- if (
--rsp->count < 0
) {
+ if (
!rsp->count--
) {
get_random_bytes(&refresh, sizeof(refresh));
rsp->state += refresh;
rsp->count = FAULT_RANDOM_REFRESH;