Commit 934c2577 authored by Qiujun Huang's avatar Qiujun Huang Committed by Yang Yingliang
Browse files

ring-buffer: Return 0 on success from ring_buffer_resize()

stable inclusion
from linux-4.19.155
commit 57ebe9102928e835d72ffec43c7995723cfea132

--------------------------------

commit 0a1754b2 upstream.

We don't need to check the new buffer size, and the return value
had confused resize_buffer_duplicate_size().
...
	ret = ring_buffer_resize(trace_buf->buffer,
		per_cpu_ptr(size_buf->data,cpu_id)->entries, cpu_id);
	if (ret == 0)
		per_cpu_ptr(trace_buf->data, cpu_id)->entries =
			per_cpu_ptr(size_buf->data, cpu_id)->entries;
...

Link: https://lkml.kernel.org/r/20201019142242.11560-1-hqjagain@gmail.com



Cc: stable@vger.kernel.org
Fixes: d60da506 ("tracing: Add a resize function to make one buffer equivalent to another buffer")
Signed-off-by: default avatarQiujun Huang <hqjagain@gmail.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 46f4a540
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment