Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 243294da authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent fad7f01e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}