Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab72a702 authored by Al Viro's avatar Al Viro
Browse files

events: don't use get_unused_fd_flags() when get_unused_fd() will do



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5b249b1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;