]> git.hungrycats.org Git - linux/commitdiff
[PATCH] seq_read() fix
authorAlexander Viro <viro@math.psu.edu>
Sat, 10 Aug 2002 09:21:28 +0000 (02:21 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Sat, 10 Aug 2002 09:21:28 +0000 (02:21 -0700)
Present both in 2.4 and 2.5 ;-/

fs/seq_file.c

index 00bdafb3af46bd38d69d2972f3b2372075ac42e7..b95d78e796ef087945dccb8b22bf4b558e2c5626 100644 (file)
@@ -94,8 +94,10 @@ ssize_t seq_read(struct file *file, char *buf, size_t size, loff_t *ppos)
                m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
                if (!m->buf)
                        goto Enomem;
+               m->count = 0;
        }
        m->op->stop(m, p);
+       m->count = 0;
        goto Done;
 Fill:
        /* they want more? let's try to get some more */