Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[platform/kernel/linux-starfive.git] / fs / proc_namespace.c
index 9a8b624..3059a93 100644 (file)
@@ -279,7 +279,8 @@ static int mounts_open_common(struct inode *inode, struct file *file,
        p->ns = ns;
        p->root = root;
        p->show = show;
-       p->cached_event = ~0ULL;
+       INIT_LIST_HEAD(&p->cursor.mnt_list);
+       p->cursor.mnt.mnt_flags = MNT_CURSOR;
 
        return 0;
 
@@ -296,6 +297,7 @@ static int mounts_release(struct inode *inode, struct file *file)
        struct seq_file *m = file->private_data;
        struct proc_mounts *p = m->private;
        path_put(&p->root);
+       mnt_cursor_del(p->ns, &p->cursor);
        put_mnt_ns(p->ns);
        return seq_release_private(inode, file);
 }