From: Lai Jiangshan Date: Mon, 9 Feb 2009 06:21:14 +0000 (+0800) Subject: ring_buffer: fix typing mistake X-Git-Tag: v2.6.30-rc1~2^2~113^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b85fa01ed958ca59523a2db3c2ee647b98745d6a;p=pandora-kernel.git ring_buffer: fix typing mistake Impact: Fix bug I found several very very curious line. It's so curious that it may be brought by typing mistake. When (cpu_buffer->reader_page == cpu_buffer->commit_page): 1) We haven't copied it for bpage is changed: bpage = cpu_buffer->reader_page->page; memcpy(bpage->data, cpu_buffer->reader_page->page->data + read ... ) 2) We need update cpu_buffer->reader_page->read, but "cpu_buffer->reader_page += read;" is not right. [ This bug was a typo. The commit->reader_page is a page pointer and not an index into the page. The line should have been commit->reader_page->read += read. The other changes by Lai are nice clean ups to the code. - SDR ] Signed-off-by: Lai Jiangshan Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed