Revert "tracing: Wake up ring buffer waiters on closing of the file"

This reverts commit 2475de2bc0 which is
commit f3ddb74ad0790030c9592229fb14d8c451f4e9a8 upstream.

It breaks the Android kernel ABI and is not needed for normal Android
systems so it is safe to remove.  If it is needed in the future, it can
be brought back in an abi-safe way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I613585981534568a6ef0aa59d80f7b09db91e552
This commit is contained in:
Greg Kroah-Hartman
2022-11-23 14:46:52 +00:00
parent d122aaf804
commit c18696c060
2 changed files with 0 additions and 16 deletions

View File

@@ -91,7 +91,6 @@ struct trace_iterator {
unsigned int temp_size;
char *fmt; /* modified format holder */
unsigned int fmt_size;
long wait_index;
/* trace_seq for __print_flags() and __print_symbolic() etc. */
struct trace_seq tmp_seq;

View File

@@ -8128,12 +8128,6 @@ static int tracing_buffers_release(struct inode *inode, struct file *file)
__trace_array_put(iter->tr);
iter->wait_index++;
/* Make sure the waiters see the new wait_index */
smp_wmb();
ring_buffer_wake_waiters(iter->array_buffer->buffer, iter->cpu_file);
if (info->spare)
ring_buffer_free_read_page(iter->array_buffer->buffer,
info->spare_cpu, info->spare);
@@ -8287,8 +8281,6 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
/* did we read anything? */
if (!spd.nr_pages) {
long wait_index;
if (ret)
goto out;
@@ -8296,8 +8288,6 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK))
goto out;
wait_index = READ_ONCE(iter->wait_index);
ret = wait_on_pipe(iter, iter->tr->buffer_percent);
if (ret)
goto out;
@@ -8306,11 +8296,6 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
if (!tracer_tracing_is_on(iter->tr))
goto out;
/* Make sure we see the new wait_index */
smp_rmb();
if (wait_index != iter->wait_index)
goto out;
goto again;
}