aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-12-18 06:38:11 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-12-18 06:38:11 -0500
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 157d1e4343c2..c2594c137e65 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)
3623{ 3623{
3624 long refresh; 3624 long refresh;
3625 3625
3626 if (--rsp->count < 0) { 3626 if (!rsp->count--) {
3627 get_random_bytes(&refresh, sizeof(refresh)); 3627 get_random_bytes(&refresh, sizeof(refresh));
3628 rsp->state += refresh; 3628 rsp->state += refresh;
3629 rsp->count = FAULT_RANDOM_REFRESH; 3629 rsp->count = FAULT_RANDOM_REFRESH;