Skip to content

Commit

Permalink
events: don't use get_unused_fd_flags() when get_unused_fd() will do
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 5b249b1 commit ab72a70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ab72a70

Please sign in to comment.