diff options
| author | Vinayak Menon <vinmenon@codeaurora.org> | 2016-11-04 10:33:48 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-20 06:14:33 -0800 |
| commit | 8da30149877dcb32f23bb3c736e5a52ffe7bbdda (patch) | |
| tree | f93906529b43d85d5b4b6c1d487673a0601f8458 | |
| parent | 002162949f1729a4ea9e63c169f684758ad04854 (diff) | |
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>
| -rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 68a4559f9d26..bec687853c5d 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -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. |
