lowmemorykiller: fix an uninitialized variable usage
Fix the data passed to trace event. Right now the trace event shows uninitialized stack data. Change-Id: Iefa3d000ba413239f127629ad11c96ffe6981cc2 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
002162949f
commit
8da3014987
1 changed files with 5 additions and 0 deletions
|
@ -179,6 +179,11 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,
|
|||
trace_almk_vmpressure(pressure, other_free, other_file);
|
||||
}
|
||||
} else if (atomic_read(&shift_adj)) {
|
||||
other_file = global_page_state(NR_FILE_PAGES) + zcache_pages() -
|
||||
global_page_state(NR_SHMEM) -
|
||||
total_swapcache_pages();
|
||||
other_free = global_page_state(NR_FREE_PAGES);
|
||||
|
||||
/*
|
||||
* shift_adj would have been set by a previous invocation
|
||||
* of notifier, which is not followed by a lowmem_shrink yet.
|
||||
|
|
Loading…
Add table
Reference in a new issue