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:
Vinayak Menon 2016-11-04 10:33:48 +05:30 committed by Gerrit - the friendly Code Review server
parent 002162949f
commit 8da3014987

View file

@ -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.