@@ -38,8 +38,7 @@ static DEFINE_MUTEX(link_mutex);
38
38
/* incremented on every opened seq_file */
39
39
static atomic64_t session_id ;
40
40
41
- static int prepare_seq_file (struct file * file , struct bpf_iter_link * link ,
42
- const struct bpf_iter_seq_info * seq_info );
41
+ static int prepare_seq_file (struct file * file , struct bpf_iter_link * link );
43
42
44
43
static void bpf_iter_inc_seq_num (struct seq_file * seq )
45
44
{
@@ -257,7 +256,7 @@ static int iter_open(struct inode *inode, struct file *file)
257
256
{
258
257
struct bpf_iter_link * link = inode -> i_private ;
259
258
260
- return prepare_seq_file (file , link , __get_seq_info ( link ) );
259
+ return prepare_seq_file (file , link );
261
260
}
262
261
263
262
static int iter_release (struct inode * inode , struct file * file )
@@ -586,9 +585,9 @@ static void init_seq_meta(struct bpf_iter_priv_data *priv_data,
586
585
priv_data -> done_stop = false;
587
586
}
588
587
589
- static int prepare_seq_file (struct file * file , struct bpf_iter_link * link ,
590
- const struct bpf_iter_seq_info * seq_info )
588
+ static int prepare_seq_file (struct file * file , struct bpf_iter_link * link )
591
589
{
590
+ const struct bpf_iter_seq_info * seq_info = __get_seq_info (link );
592
591
struct bpf_iter_priv_data * priv_data ;
593
592
struct bpf_iter_target_info * tinfo ;
594
593
struct bpf_prog * prog ;
@@ -653,7 +652,7 @@ int bpf_iter_new_fd(struct bpf_link *link)
653
652
}
654
653
655
654
iter_link = container_of (link , struct bpf_iter_link , link );
656
- err = prepare_seq_file (file , iter_link , __get_seq_info ( iter_link ) );
655
+ err = prepare_seq_file (file , iter_link );
657
656
if (err )
658
657
goto free_file ;
659
658
0 commit comments