Skip to content

Commit

Permalink
perf_event: Make perf fd non seekable
Browse files Browse the repository at this point in the history
Perf_event does not need seeking, so prevent it in order to
get rid of default_llseek, which uses the BKL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
[drop the nonseekable_open, not needed for anon inodes]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Arnd Bergmann authored and Frederic Weisbecker committed Apr 4, 2010
1 parent 6cc8a7c commit 3326c1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2645,6 +2645,7 @@ static int perf_fasync(int fd, struct file *filp, int on)
}

static const struct file_operations perf_fops = {
.llseek = no_llseek,
.release = perf_release,
.read = perf_read,
.poll = perf_poll,
Expand Down

0 comments on commit 3326c1c

Please sign in to comment.