diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-18 12:38:11 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-18 12:38:11 +0100 |
commit | 4a63b030d75a063b910b2bab014d84837cb33eb7 (patch) | |
tree | 434f97934498ea53c3dbe6c97b5ac38a96418e3d | |
parent | 1de6129f381b4907013ccea08a3bdea8c966d50a (diff) | |
download | op-kernel-dev-4a63b030d75a063b910b2bab014d84837cb33eb7.zip op-kernel-dev-4a63b030d75a063b910b2bab014d84837cb33eb7.tar.gz |
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>
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 157d1e4..c2594c1 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; |