Skip to content

Commit 02e5ad9

Browse files
author
Al Viro
committed
perf_event_get(): don't bother with fget_raw()
... since we immediately follow that with check that it *is* an opened perf file, with O_PATH ones ending with with the same -EBADF we'd get for descriptor that isn't opened at all. Signed-off-by: Al Viro <[email protected]>
1 parent 8811249 commit 02e5ad9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/events/core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11554,9 +11554,7 @@ void perf_event_delayed_put(struct task_struct *task)
1155411554

1155511555
struct file *perf_event_get(unsigned int fd)
1155611556
{
11557-
struct file *file;
11558-
11559-
file = fget_raw(fd);
11557+
struct file *file = fget(fd);
1156011558
if (!file)
1156111559
return ERR_PTR(-EBADF);
1156211560

0 commit comments

Comments
 (0)