diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-06 06:11:38 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-06 06:11:42 +0200 |
commit | ed011b22ce567eabefa9ea571d3721c10ecd0553 (patch) | |
tree | c7aee6684613075c772388a99a9137014549434e /kernel/trace/ftrace.c | |
parent | 85bac32c4a52c592b857f2c360cc5ec93a097d70 (diff) | |
parent | e07cccf4046978df10f2e13fe2b99b2f9b3a65db (diff) |
Merge commit 'v2.6.31-rc9' into tracing/core
Merge reason: move from -rc5 to -rc9.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1993b7186cd..8c804e24f96 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2222,7 +2222,11 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, read++; cnt--; - if (!(iter->flags & ~FTRACE_ITER_CONT)) { + /* + * If the parser haven't finished with the last write, + * continue reading the user input without skipping spaces. + */ + if (!(iter->flags & FTRACE_ITER_CONT)) { /* skip white space */ while (cnt && isspace(ch)) { ret = get_user(ch, ubuf++); @@ -2232,8 +2236,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, cnt--; } + /* only spaces were written */ if (isspace(ch)) { - file->f_pos += read; + *ppos += read; ret = read; goto out; } @@ -2262,12 +2267,12 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, if (ret) goto out; iter->buffer_idx = 0; - } else + } else { iter->flags |= FTRACE_ITER_CONT; + iter->buffer[iter->buffer_idx++] = ch; + } - - file->f_pos += read; - + *ppos += read; ret = read; out: mutex_unlock(&ftrace_regex_lock); |