Code Review
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[PATCH] files: lock-free fd look-up
[linux-2.6.git]
/
arch
/
mips
/
kernel
/
irixioctl.c
diff --git
a/arch/mips/kernel/irixioctl.c
b/arch/mips/kernel/irixioctl.c
index 4cd3d38a22c254ce7fec677d85ca766d2986f07e..3cdc22346f4c75a69729810a668c0cb4aaafaf14 100644
(file)
--- a/
arch/mips/kernel/irixioctl.c
+++ b/
arch/mips/kernel/irixioctl.c
@@
-14,6
+14,7
@@
#include <linux/syscalls.h>
#include <linux/tty.h>
#include <linux/file.h>
#include <linux/syscalls.h>
#include <linux/tty.h>
#include <linux/file.h>
+#include <linux/rcupdate.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
@@
-33,7
+34,7
@@
static struct tty_struct *get_tty(int fd)
struct file *filp;
struct tty_struct *ttyp = NULL;
struct file *filp;
struct tty_struct *ttyp = NULL;
-
spin_lock(¤t->files->file_lock
);
+
rcu_read_lock(
);
filp = fcheck(fd);
if(filp && filp->private_data) {
ttyp = (struct tty_struct *) filp->private_data;
filp = fcheck(fd);
if(filp && filp->private_data) {
ttyp = (struct tty_struct *) filp->private_data;
@@
-41,7
+42,7
@@
static struct tty_struct *get_tty(int fd)
if(ttyp->magic != TTY_MAGIC)
ttyp =NULL;
}
if(ttyp->magic != TTY_MAGIC)
ttyp =NULL;
}
-
spin_unlock(¤t->files->file_lock
);
+
rcu_read_unlock(
);
return ttyp;
}
return ttyp;
}