smb311: Add support for lookup with posix extensions query info
[linux-2.6-microblaze.git] / fs / proc_namespace.c
index 273ee82..3059a93 100644 (file)
@@ -37,23 +37,23 @@ static __poll_t mounts_poll(struct file *file, poll_table *wait)
        return res;
 }
 
-struct proc_fs_info {
+struct proc_fs_opts {
        int flag;
        const char *str;
 };
 
 static int show_sb_opts(struct seq_file *m, struct super_block *sb)
 {
-       static const struct proc_fs_info fs_info[] = {
+       static const struct proc_fs_opts fs_opts[] = {
                { SB_SYNCHRONOUS, ",sync" },
                { SB_DIRSYNC, ",dirsync" },
                { SB_MANDLOCK, ",mand" },
                { SB_LAZYTIME, ",lazytime" },
                { 0, NULL }
        };
-       const struct proc_fs_info *fs_infop;
+       const struct proc_fs_opts *fs_infop;
 
-       for (fs_infop = fs_info; fs_infop->flag; fs_infop++) {
+       for (fs_infop = fs_opts; fs_infop->flag; fs_infop++) {
                if (sb->s_flags & fs_infop->flag)
                        seq_puts(m, fs_infop->str);
        }
@@ -63,7 +63,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb)
 
 static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt)
 {
-       static const struct proc_fs_info mnt_info[] = {
+       static const struct proc_fs_opts mnt_opts[] = {
                { MNT_NOSUID, ",nosuid" },
                { MNT_NODEV, ",nodev" },
                { MNT_NOEXEC, ",noexec" },
@@ -72,9 +72,9 @@ static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt)
                { MNT_RELATIME, ",relatime" },
                { 0, NULL }
        };
-       const struct proc_fs_info *fs_infop;
+       const struct proc_fs_opts *fs_infop;
 
-       for (fs_infop = mnt_info; fs_infop->flag; fs_infop++) {
+       for (fs_infop = mnt_opts; fs_infop->flag; fs_infop++) {
                if (mnt->mnt_flags & fs_infop->flag)
                        seq_puts(m, fs_infop->str);
        }
@@ -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);
 }