[PATCH] remove for_each_cpu()
[linux-2.6.git] / arch / sparc64 / solaris / ioctl.c
index cac0a1cf0050b5e55cf23a13f1d1504b5d1a0d0d..be0a054e3ed6b1d3c22b652978a56d916aa25c0f 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/netdevice.h>
 #include <linux/mtio.h>
 #include <linux/time.h>
+#include <linux/rcupdate.h>
 #include <linux/compat.h>
 
 #include <net/sock.h>
@@ -293,16 +294,18 @@ static struct module_info {
 static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg)
 {
        struct inode *ino;
+       struct fdtable *fdt;
        /* I wonder which of these tests are superfluous... --patrik */
-       spin_lock(&current->files->file_lock);
-       if (! current->files->fd[fd] ||
-           ! current->files->fd[fd]->f_dentry ||
-           ! (ino = current->files->fd[fd]->f_dentry->d_inode) ||
+       rcu_read_lock();
+       fdt = files_fdtable(current->files);
+       if (! fdt->fd[fd] ||
+           ! fdt->fd[fd]->f_dentry ||
+           ! (ino = fdt->fd[fd]->f_dentry->d_inode) ||
            ! S_ISSOCK(ino->i_mode)) {
-               spin_unlock(&current->files->file_lock);
+               rcu_read_unlock();
                return TBADF;
        }
-       spin_unlock(&current->files->file_lock);
+       rcu_read_unlock();
        
        switch (cmd & 0xff) {
        case 109: /* SI_SOCKPARAMS */