提交 cf8517cf 编写于 作者: J Jiri Olsa 提交者: Ingo Molnar

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: NJiri Olsa <jolsa@redhat.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091023233646.399670810@goodmis.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 964fe080
...@@ -740,7 +740,7 @@ ftrace_profile_write(struct file *filp, const char __user *ubuf, ...@@ -740,7 +740,7 @@ ftrace_profile_write(struct file *filp, const char __user *ubuf,
out: out:
mutex_unlock(&ftrace_profile_lock); mutex_unlock(&ftrace_profile_lock);
filp->f_pos += cnt; *ppos += cnt;
return cnt; return cnt;
} }
......
...@@ -2440,7 +2440,7 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf, ...@@ -2440,7 +2440,7 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf,
return ret; return ret;
} }
filp->f_pos += cnt; *ppos += cnt;
return cnt; return cnt;
} }
...@@ -2582,7 +2582,7 @@ tracing_ctrl_write(struct file *filp, const char __user *ubuf, ...@@ -2582,7 +2582,7 @@ tracing_ctrl_write(struct file *filp, const char __user *ubuf,
} }
mutex_unlock(&trace_types_lock); mutex_unlock(&trace_types_lock);
filp->f_pos += cnt; *ppos += cnt;
return cnt; return cnt;
} }
...@@ -2764,7 +2764,7 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf, ...@@ -2764,7 +2764,7 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
if (err) if (err)
return err; return err;
filp->f_pos += ret; *ppos += ret;
return ret; return ret;
} }
...@@ -3299,7 +3299,7 @@ tracing_entries_write(struct file *filp, const char __user *ubuf, ...@@ -3299,7 +3299,7 @@ tracing_entries_write(struct file *filp, const char __user *ubuf,
} }
} }
filp->f_pos += cnt; *ppos += cnt;
/* If check pages failed, return ENOMEM */ /* If check pages failed, return ENOMEM */
if (tracing_disabled) if (tracing_disabled)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册