From: Tejun Heo <tj@kernel.org>
To: Jens Axboe <jens.axboe@oracle.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions
Date: Wed, 03 Sep 2008 19:32:29 +0200 [thread overview]
Message-ID: <48BECA2D.8000400@kernel.org> (raw)
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;
}
next reply other threads:[~2008-09-03 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 17:32 Tejun Heo [this message]
2008-09-04 7:16 ` [PATCH linux-2.6-block#for-2.6.28] block: fix duplicate headers for /proc/partitions Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48BECA2D.8000400@kernel.org \
--to=tj@kernel.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.