Skip to content

Commit 4a01398

Browse files
khueyIngo Molnar
authored andcommitted
perf: Move perf_event_fasync() to perf_event.h
This will allow it to be called from perf_output_wakeup(). Signed-off-by: Kyle Huey <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d0331aa commit 4a01398

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

include/linux/perf_event.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,14 @@ perf_event_addr_filters(struct perf_event *event)
16861686
return ifh;
16871687
}
16881688

1689+
static inline struct fasync_struct **perf_event_fasync(struct perf_event *event)
1690+
{
1691+
/* Only the parent has fasync state */
1692+
if (event->parent)
1693+
event = event->parent;
1694+
return &event->fasync;
1695+
}
1696+
16891697
extern void perf_event_addr_filters_sync(struct perf_event *event);
16901698
extern void perf_report_aux_output_id(struct perf_event *event, u64 hw_id);
16911699

kernel/events/core.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6703,14 +6703,6 @@ static const struct file_operations perf_fops = {
67036703
* to user-space before waking everybody up.
67046704
*/
67056705

6706-
static inline struct fasync_struct **perf_event_fasync(struct perf_event *event)
6707-
{
6708-
/* only the parent has fasync state */
6709-
if (event->parent)
6710-
event = event->parent;
6711-
return &event->fasync;
6712-
}
6713-
67146706
void perf_event_wakeup(struct perf_event *event)
67156707
{
67166708
ring_buffer_wakeup(event);

0 commit comments

Comments
 (0)