projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1ece0c
)
Compression buffer fill fix
author
Jens Axboe
<axboe@kernel.dk>
Fri, 9 Mar 2012 18:00:31 +0000
(19:00 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 9 Mar 2012 18:00:31 +0000
(19:00 +0100)
We need to advance after the zero fill as well.
Reported-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/rand.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/rand.c
b/lib/rand.c
index 995035fea742ad211f757bc12427c2160629b4c1..a79fb9c17c321a94e8e4bcfe030193003c80d93f 100644
(file)
--- a/
lib/rand.c
+++ b/
lib/rand.c
@@
-125,6
+125,8
@@
unsigned long fill_random_buf_percentage(struct frand_state *fs, void *buf,
this_len = len;
memset(buf, 0, this_len);
this_len = len;
memset(buf, 0, this_len);
+ len -= this_len;
+ buf += this_len;
}
return r;
}
return r;