提交 243294da 编写于 作者: T Tejun Heo 提交者: Jens Axboe

block: fix duplicate headers for /proc/partitions

seqf can be started multiple times for a read and the header should be
printed only for the initial one.  Fix it.
Signed-off-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 fad7f01e
......@@ -697,7 +697,7 @@ static void *show_partition_start(struct seq_file *seqf, loff_t *pos)
static void *p;
p = disk_seqf_start(seqf, pos);
if (!IS_ERR(p) && p)
if (!IS_ERR(p) && p && !*pos)
seq_puts(seqf, "major minor #blocks name\n\n");
return p;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册