aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-12-18 12:38:11 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-18 12:38:11 +0100
commit4a63b030d75a063b910b2bab014d84837cb33eb7 (patch)
tree434f97934498ea53c3dbe6c97b5ac38a96418e3d /drivers/block
parent1de6129f381b4907013ccea08a3bdea8c966d50a (diff)
drbd: fix test of unsigned in _drbd_fault_random()
rsp->count is unsigned so the test does not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com> Cc: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 157d1e4343c..c2594c137e6 100644
--- 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;