Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/roste...
authorIngo Molnar <mingo@elte.hu>
Thu, 16 Dec 2010 10:21:24 +0000 (11:21 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Dec 2010 10:21:24 +0000 (11:21 +0100)
1  2 
kernel/trace/trace.c

diff --combined kernel/trace/trace.c
@@@ -17,6 -17,7 +17,6 @@@
  #include <linux/writeback.h>
  #include <linux/kallsyms.h>
  #include <linux/seq_file.h>
 -#include <linux/smp_lock.h>
  #include <linux/notifier.h>
  #include <linux/irqflags.h>
  #include <linux/debugfs.h>
@@@ -2338,11 -2339,19 +2338,19 @@@ tracing_write_stub(struct file *filp, c
        return count;
  }
  
+ static loff_t tracing_seek(struct file *file, loff_t offset, int origin)
+ {
+       if (file->f_mode & FMODE_READ)
+               return seq_lseek(file, offset, origin);
+       else
+               return 0;
+ }
  static const struct file_operations tracing_fops = {
        .open           = tracing_open,
        .read           = seq_read,
        .write          = tracing_write_stub,
-       .llseek         = seq_lseek,
+       .llseek         = tracing_seek,
        .release        = tracing_release,
  };