diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/irixioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c index 4cd3d38a22c2..3cdc22346f4c 100644 --- a/arch/mips/kernel/irixioctl.c +++ b/arch/mips/kernel/irixioctl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/syscalls.h> | 14 | #include <linux/syscalls.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
16 | #include <linux/file.h> | 16 | #include <linux/file.h> |
17 | #include <linux/rcupdate.h> | ||
17 | 18 | ||
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
19 | #include <asm/ioctl.h> | 20 | #include <asm/ioctl.h> |
@@ -33,7 +34,7 @@ static struct tty_struct *get_tty(int fd) | |||
33 | struct file *filp; | 34 | struct file *filp; |
34 | struct tty_struct *ttyp = NULL; | 35 | struct tty_struct *ttyp = NULL; |
35 | 36 | ||
36 | spin_lock(¤t->files->file_lock); | 37 | rcu_read_lock(); |
37 | filp = fcheck(fd); | 38 | filp = fcheck(fd); |
38 | if(filp && filp->private_data) { | 39 | if(filp && filp->private_data) { |
39 | ttyp = (struct tty_struct *) filp->private_data; | 40 | ttyp = (struct tty_struct *) filp->private_data; |
@@ -41,7 +42,7 @@ static struct tty_struct *get_tty(int fd) | |||
41 | if(ttyp->magic != TTY_MAGIC) | 42 | if(ttyp->magic != TTY_MAGIC) |
42 | ttyp =NULL; | 43 | ttyp =NULL; |
43 | } | 44 | } |
44 | spin_unlock(¤t->files->file_lock); | 45 | rcu_read_unlock(); |
45 | return ttyp; | 46 | return ttyp; |
46 | } | 47 | } |
47 | 48 | ||