lfsr: Fix spin related bug
authorAlex Pyrgiotis <apyrgio@grnet.gr>
Sun, 10 Mar 2013 09:58:05 +0000 (10:58 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 10 Mar 2013 09:58:05 +0000 (10:58 +0100)
commita64ea63f648e77d583b5287634f44bea7da79b4b
tree507607fa1558f96a629cb2463216583f1d8f82a3
parentb136e932040242ff2245e5cfc97df82a7fd03ceb
lfsr: Fix spin related bug

On the previous patch on cycle detection, we would incremet spin value
when:

    num_vals % cycle_length == 0

which would evaluate always to true for the first iteration since we
start with num_vals = 0. Only one corner-case is affected by this bug
and this patch should fix it.

Signed-off-by: Alex Pyrgiotis <apyrgio@grnet.gr>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/lfsr.c