kernfs: drop shared NUMA mempolicy hooks
[linux-2.6-microblaze.git] / fs / kernfs / file.c
index 180906c..aaa7641 100644 (file)
@@ -429,60 +429,11 @@ static int kernfs_vma_access(struct vm_area_struct *vma, unsigned long addr,
        return ret;
 }
 
-#ifdef CONFIG_NUMA
-static int kernfs_vma_set_policy(struct vm_area_struct *vma,
-                                struct mempolicy *new)
-{
-       struct file *file = vma->vm_file;
-       struct kernfs_open_file *of = kernfs_of(file);
-       int ret;
-
-       if (!of->vm_ops)
-               return 0;
-
-       if (!kernfs_get_active(of->kn))
-               return -EINVAL;
-
-       ret = 0;
-       if (of->vm_ops->set_policy)
-               ret = of->vm_ops->set_policy(vma, new);
-
-       kernfs_put_active(of->kn);
-       return ret;
-}
-
-static struct mempolicy *kernfs_vma_get_policy(struct vm_area_struct *vma,
-                                              unsigned long addr)
-{
-       struct file *file = vma->vm_file;
-       struct kernfs_open_file *of = kernfs_of(file);
-       struct mempolicy *pol;
-
-       if (!of->vm_ops)
-               return vma->vm_policy;
-
-       if (!kernfs_get_active(of->kn))
-               return vma->vm_policy;
-
-       pol = vma->vm_policy;
-       if (of->vm_ops->get_policy)
-               pol = of->vm_ops->get_policy(vma, addr);
-
-       kernfs_put_active(of->kn);
-       return pol;
-}
-
-#endif
-
 static const struct vm_operations_struct kernfs_vm_ops = {
        .open           = kernfs_vma_open,
        .fault          = kernfs_vma_fault,
        .page_mkwrite   = kernfs_vma_page_mkwrite,
        .access         = kernfs_vma_access,
-#ifdef CONFIG_NUMA
-       .set_policy     = kernfs_vma_set_policy,
-       .get_policy     = kernfs_vma_get_policy,
-#endif
 };
 
 static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)