summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-06-27 03:43:53 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2019-06-27 03:43:53 +0300
commit02e5ad973883c36c0868b301b8357d9c455bb91c (patch)
tree635b3f2fd1cfa94597a1dfa12b018661b114a454
parent8811249f0cfdd6552152173f881fddc7f20f427e (diff)
downloadlinux-02e5ad973883c36c0868b301b8357d9c455bb91c.tar.xz
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 <viro@zeniv.linux.org.uk>
-rw-r--r--kernel/events/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index abbd4b3b96c2..f9ff04c8d084 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11554,9 +11554,7 @@ void perf_event_delayed_put(struct task_struct *task)
struct file *perf_event_get(unsigned int fd)
{
- struct file *file;
-
- file = fget_raw(fd);
+ struct file *file = fget(fd);
if (!file)
return ERR_PTR(-EBADF);