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
This commit is contained in:
Yuntao Wang 2022-04-10 14:00:19 +08:00 committed by Daniel Borkmann
parent f4fd706f73
commit aa1b02e674
2 changed files with 1 additions and 2 deletions

View File

@ -545,7 +545,7 @@ int bpf_iter_link_attach(const union bpf_attr *attr, bpfptr_t uattr,
bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog); bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog);
link->tinfo = tinfo; link->tinfo = tinfo;
err = bpf_link_prime(&link->link, &link_primer); err = bpf_link_prime(&link->link, &link_primer);
if (err) { if (err) {
kfree(link); kfree(link);
return err; return err;

View File

@ -99,7 +99,6 @@ static int __task_seq_show(struct seq_file *seq, struct task_struct *task,
if (!prog) if (!prog)
return 0; return 0;
meta.seq = seq;
ctx.meta = &meta; ctx.meta = &meta;
ctx.task = task; ctx.task = task;
return bpf_iter_run_prog(prog, &ctx); return bpf_iter_run_prog(prog, &ctx);