Skip to content

Commit aa1b02e

Browse files
ytcoodeborkmann
authored andcommitted
bpf: Remove redundant assignment to meta.seq in __task_seq_show()
The seq argument is assigned to meta.seq twice, the second one is redundant, remove it. This patch also removes a redundant space in bpf_iter_link_attach(). Signed-off-by: Yuntao Wang <ytcoode@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20220410060020.307283-1-ytcoode@gmail.com
1 parent f4fd706 commit aa1b02e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

kernel/bpf/bpf_iter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ int bpf_iter_link_attach(const union bpf_attr *attr, bpfptr_t uattr,
545545
bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog);
546546
link->tinfo = tinfo;
547547

548-
err = bpf_link_prime(&link->link, &link_primer);
548+
err = bpf_link_prime(&link->link, &link_primer);
549549
if (err) {
550550
kfree(link);
551551
return err;

kernel/bpf/task_iter.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ static int __task_seq_show(struct seq_file *seq, struct task_struct *task,
9999
if (!prog)
100100
return 0;
101101

102-
meta.seq = seq;
103102
ctx.meta = &meta;
104103
ctx.task = task;
105104
return bpf_iter_run_prog(prog, &ctx);

0 commit comments

Comments
 (0)