diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-15 22:55:44 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2009-12-21 13:37:29 +0100 |
commit | 49829ea74f790d3be2e803a617e714f5b9a5ed50 (patch) | |
tree | 2704a2c65988e426a07aec9e5f5f83337fb2072b | |
parent | 7d4e9d0962cd0f6a30b01e256756dd10606dab30 (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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.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 af30ca97493..ecc1612df67 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; |