diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index dc9d7ac8228db..c04815bb15cc1 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -198,6 +198,7 @@ static void *map_seq_next(struct seq_file *m, void *v, loff_t *pos) void *key = map_iter(m)->key; void *prev_key; + (*pos)++; if (map_iter(m)->done) return NULL; @@ -210,8 +211,6 @@ static void *map_seq_next(struct seq_file *m, void *v, loff_t *pos) map_iter(m)->done = true; return NULL; } - - ++(*pos); return key; }