[PATCH] files: lock-free fd look-up
[linux-2.6.git] / arch / sparc64 / solaris / ioctl.c
index 3747664..be0a054 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>
@@ -295,16 +296,16 @@ 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);
+       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 */