diff options
author | Greg Price <[email protected]> | 2013-11-29 15:56:16 -0500 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2014-03-19 22:18:51 -0400 |
commit | ee1de406ba6eb1e01f143fe3351e70cc772cc63e (patch) | |
tree | 9e2cd3196e964515cfcfbfcfe343201b42cfe6c9 /lib/memory-notifier-error-inject.c | |
parent | 19fa5be1d92be3112521145bf99f77007abf6b16 (diff) |
random: simplify accounting logic
This logic is exactly equivalent to the old logic, but it should
be easier to see what it's doing.
The equivalence depends on one fact from outside this function:
when 'r->limit' is false, 'reserved' is zero. (Well, two facts;
the other is that 'reserved' is never negative.)
Cc: Jiri Kosina <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Greg Price <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions