* [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions
@ 2008-09-03 17:32 Tejun Heo
2008-09-04 7:16 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2008-09-03 17:32 UTC (permalink / raw)
To: Jens Axboe, Linux Kernel Mailing List
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: Tejun Heo <tj@kernel.org>
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index ed926b7..8acaff0 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions
2008-09-03 17:32 [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions Tejun Heo
@ 2008-09-04 7:16 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2008-09-04 7:16 UTC (permalink / raw)
To: Tejun Heo; +Cc: Linux Kernel Mailing List
On Wed, Sep 03 2008, Tejun Heo wrote:
> seqf can be started multiple times for a read and the header should be
> printed only for the initial one. Fix it.
Applied
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-04 7:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 17:32 [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions Tejun Heo
2008-09-04 7:16 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).