vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy
[linux-2.6-block.git] / arch / riscv / kernel / vdso.c
index 123d05255fcfa63b4ff418e51383d54391e5d7f8..e410275918ac4524649552c1f6e683a7129600b2 100644 (file)
@@ -137,28 +137,6 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
        mmap_read_unlock(mm);
        return 0;
 }
-
-static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
-{
-       if (likely(vma->vm_mm == current->mm))
-               return current->nsproxy->time_ns->vvar_page;
-
-       /*
-        * VM_PFNMAP | VM_IO protect .fault() handler from being called
-        * through interfaces like /proc/$pid/mem or
-        * process_vm_{readv,writev}() as long as there's no .access()
-        * in special_mapping_vmops.
-        * For more details check_vma_flags() and __access_remote_vm()
-        */
-       WARN(1, "vvar_page accessed remotely");
-
-       return NULL;
-}
-#else
-static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
-{
-       return NULL;
-}
 #endif
 
 static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,