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>
This commit is contained in:
parent
8811249f0c
commit
02e5ad9738
|
@ -11554,9 +11554,7 @@ void perf_event_delayed_put(struct task_struct *task)
|
||||||
|
|
||||||
struct file *perf_event_get(unsigned int fd)
|
struct file *perf_event_get(unsigned int fd)
|
||||||
{
|
{
|
||||||
struct file *file;
|
struct file *file = fget(fd);
|
||||||
|
|
||||||
file = fget_raw(fd);
|
|
||||||
if (!file)
|
if (!file)
|
||||||
return ERR_PTR(-EBADF);
|
return ERR_PTR(-EBADF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue