Message ID | tencent_9A6EC60CB9E7CC86D692D68663099CEEDA06@qq.com |
---|---|
State | New |
Headers | show |
Series | fs/seq_file: Exit the subsequent process when seq start fails | expand |
diff --git a/fs/seq_file.c b/fs/seq_file.c index 8bbb1ad46335..130424bbcf7d 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -104,6 +104,9 @@ static int traverse(struct seq_file *m, loff_t offset) return -ENOMEM; } p = m->op->start(m, &m->index); + if (!p && !m->private) + return 0; + while (p) { error = PTR_ERR(p); if (IS_ERR(p))