Explorar o código

ring-buffer: fix ret in rb_add_time_stamp

The update of ret got mistakenly added to the if statement of
rb_try_to_discard. The variable ret should be 1 on commit and zero
otherwise.

[ Impact: fix compiler warning and real bug ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt %!s(int64=16) %!d(string=hai) anos
pai
achega
f57a8a1911
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kernel/trace/ring_buffer.c

+ 1 - 1
kernel/trace/ring_buffer.c

@@ -1433,8 +1433,8 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
 			/* Darn, this is just wasted space */
 			event->time_delta = 0;
 			event->array[0] = 0;
-			ret = 0;
 		}
+		ret = 0;
 	}
 
 	*delta = 0;