events: don't use get_unused_fd_flags() when get_unused_fd() will do
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 21 Aug 2012 13:40:46 +0000 (09:40 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 01:08:52 +0000 (21:08 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/events/core.c

index 7fee567153f022cc2a097135a524bf393887e1a2..2bd199bfaef8118cb15963b789bb2cca09942da2 100644 (file)
@@ -6264,7 +6264,7 @@ SYSCALL_DEFINE5(perf_event_open,
        if ((flags & PERF_FLAG_PID_CGROUP) && (pid == -1 || cpu == -1))
                return -EINVAL;
 
-       event_fd = get_unused_fd_flags(O_RDWR);
+       event_fd = get_unused_fd();
        if (event_fd < 0)
                return event_fd;