summaryrefslogtreecommitdiff
path: root/kernel/kcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kcmp.c')
-rw-r--r--kernel/kcmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/kcmp.c b/kernel/kcmp.c
index 5353edfad8e1..2c596851f8a9 100644
--- a/kernel/kcmp.c
+++ b/kernel/kcmp.c
@@ -63,9 +63,9 @@ get_file_raw_ptr(struct task_struct *task, unsigned int idx)
{
struct file *file;
- rcu_read_lock();
- file = task_lookup_fd_rcu(task, idx);
- rcu_read_unlock();
+ file = fget_task(task, idx);
+ if (file)
+ fput(file);
return file;
}