Commit cf8517cf905b5cd31d5790250b9ac39f7cb8aa53

Authored by Jiri Olsa
Committed by Ingo Molnar
1 parent 964fe080d9

tracing: Update *ppos instead of filp->f_pos

Instead of directly updating filp->f_pos we should update the *ppos
argument. The filp->f_pos gets updated within the file_pos_write()
function called from sys_write().

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091023233646.399670810@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff

kernel/trace/ftrace.c
... ... @@ -740,7 +740,7 @@
740 740 out:
741 741 mutex_unlock(&ftrace_profile_lock);
742 742  
743   - filp->f_pos += cnt;
  743 + *ppos += cnt;
744 744  
745 745 return cnt;
746 746 }
kernel/trace/trace.c
... ... @@ -2440,7 +2440,7 @@
2440 2440 return ret;
2441 2441 }
2442 2442  
2443   - filp->f_pos += cnt;
  2443 + *ppos += cnt;
2444 2444  
2445 2445 return cnt;
2446 2446 }
... ... @@ -2582,7 +2582,7 @@
2582 2582 }
2583 2583 mutex_unlock(&trace_types_lock);
2584 2584  
2585   - filp->f_pos += cnt;
  2585 + *ppos += cnt;
2586 2586  
2587 2587 return cnt;
2588 2588 }
... ... @@ -2764,7 +2764,7 @@
2764 2764 if (err)
2765 2765 return err;
2766 2766  
2767   - filp->f_pos += ret;
  2767 + *ppos += ret;
2768 2768  
2769 2769 return ret;
2770 2770 }
... ... @@ -3299,7 +3299,7 @@
3299 3299 }
3300 3300 }
3301 3301  
3302   - filp->f_pos += cnt;
  3302 + *ppos += cnt;
3303 3303  
3304 3304 /* If check pages failed, return ENOMEM */
3305 3305 if (tracing_disabled)