提交 02e5ad97 编写于 作者: A Al Viro

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 8811249f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册