GIT: unionfs2-2.6.27.y: trace: Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:21 EDT 2010
commit 0851f4563b9e0770d4b3c071e605cb5e150c6ed3
Author: Wang Sheng-Hui <crosslonelyover at gmail.com>
Date: Tue Apr 13 21:04:10 2010 +0800
trace: Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()
[No matching upstream git commit id as it was fixed differently due to a
rewrite of the tracing code there.]
For normal case, the code in trace_free_page() do once more substraction
on tracing_pages_allocated, but for CONFIG_TRACER_MAX_TRACE Â it doesn't
take the freed page into account. That's not consistent with
trace_alloc_page(). Well, for there are no message related with this,
so we cannot observe its incorrect state when the kernel doesn't define
"CONFIG_TRACER_MAX_TRACE". If you add some pr_info() as
trace_alloc_page(), you may notice it.
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Frederic Weisbecker <fweisbec at gmail.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Li Zefan <lizf at cn.fujitsu.com>
Signed-off-by: Wang Sheng-Hui <crosslonelyover at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8f3fb3d..dfe3995 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3018,7 +3018,6 @@ static int trace_free_page(void)
ClearPageLRU(page);
list_del(&page->lru);
tracing_pages_allocated--;
- tracing_pages_allocated--;
__free_page(page);
tracing_reset(data);
@@ -3036,6 +3035,7 @@ static int trace_free_page(void)
page = list_entry(p, struct page, lru);
ClearPageLRU(page);
list_del(&page->lru);
+ tracing_pages_allocated--;
__free_page(page);
tracing_reset(data);
More information about the unionfs-cvs
mailing list