[PATCH] files: break up files struct
[linux-2.6-block.git] / fs / proc / base.c
index 84751f3f52d530e86518247e3cace7d20646ed80..d0087a0b024be49d86a1ec0ee47df2259d711c7c 100644 (file)
@@ -1039,6 +1039,7 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir)
        int retval;
        char buf[NUMBUF];
        struct files_struct * files;
+       struct fdtable *fdt;
 
        retval = -ENOENT;
        if (!pid_alive(p))
@@ -1062,8 +1063,9 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir)
                        if (!files)
                                goto out;
                        spin_lock(&files->file_lock);
+                       fdt = files_fdtable(files);
                        for (fd = filp->f_pos-2;
-                            fd < files->max_fds;
+                            fd < fdt->max_fds;
                             fd++, filp->f_pos++) {
                                unsigned int i,j;