Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49829ea7 authored by Roel Kluin's avatar Roel Kluin Committed by Philipp Reisner
Browse files

drbd: Fix test of unsigned in _drbd_fault_random()



rsp->count is unsigned so the test does not work.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
parent 7d4e9d09
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;