block: fix partial read() of /proc/{partitions,diskstats}
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 16 Aug 2008 12:30:30 +0000 (14:30 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Aug 2008 17:15:38 +0000 (10:15 -0700)
commit068281d302def5efd96d84a163ba17e85f5ea564
treef8d49d6c1e2043bcf3671504b411770a0c8c349c
parentf5a6d958b5d0a10e7e7a9dee1862fb31d08c6d26
block: fix partial read() of /proc/{partitions,diskstats}

The proc files get truncated if they do not fit into the buffer with
a single read(). We need to move the seq_file index from the callback
of class_find_device() to the caller of class_find_device(), to keep
its value across multiple invocations of the callback.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/genhd.c