diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-15 16:55:44 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2009-12-21 07:37:29 -0500 |
commit | 49829ea74f790d3be2e803a617e714f5b9a5ed50 (patch) | |
tree | 2704a2c65988e426a07aec9e5f5f83337fb2072b /drivers/block/drbd/drbd_main.c | |
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>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-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 af30ca97493c..ecc1612df676 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; |