[PATCH] sched: less newidle locking
[pandora-kernel.git] / fs / locks.c
index 11956b6..c2c09b4 100644 (file)
@@ -2198,21 +2198,23 @@ void steal_locks(fl_owner_t from)
 {
        struct files_struct *files = current->files;
        int i, j;
+       struct fdtable *fdt;
 
        if (from == files)
                return;
 
        lock_kernel();
        j = 0;
+       fdt = files_fdtable(files);
        for (;;) {
                unsigned long set;
                i = j * __NFDBITS;
-               if (i >= files->max_fdset || i >= files->max_fds)
+               if (i >= fdt->max_fdset || i >= fdt->max_fds)
                        break;
-               set = files->open_fds->fds_bits[j++];
+               set = fdt->open_fds->fds_bits[j++];
                while (set) {
                        if (set & 1) {
-                               struct file *file = files->fd[i];
+                               struct file *file = fdt->fd[i];
                                if (file)
                                        __steal_locks(file, from);
                        }