summaryrefslogtreecommitdiffstats
path: root/kernel/fs/seq_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/seq_file.c')
-rw-r--r--kernel/fs/seq_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/fs/seq_file.c b/kernel/fs/seq_file.c
index e85664b7c..d672e2fec 100644
--- a/kernel/fs/seq_file.c
+++ b/kernel/fs/seq_file.c
@@ -222,8 +222,10 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
size -= n;
buf += n;
copied += n;
- if (!m->count)
+ if (!m->count) {
+ m->from = 0;
m->index++;
+ }
if (!size)
goto Done;
}