diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mempolicy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b4eababc8198..13492d66b7c8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -664,10 +664,10 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len, | |||
664 | #endif | 664 | #endif |
665 | 665 | ||
666 | /* Return effective policy for a VMA */ | 666 | /* Return effective policy for a VMA */ |
667 | static struct mempolicy * | 667 | struct mempolicy * |
668 | get_vma_policy(struct vm_area_struct *vma, unsigned long addr) | 668 | get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr) |
669 | { | 669 | { |
670 | struct mempolicy *pol = current->mempolicy; | 670 | struct mempolicy *pol = task->mempolicy; |
671 | 671 | ||
672 | if (vma) { | 672 | if (vma) { |
673 | if (vma->vm_ops && vma->vm_ops->get_policy) | 673 | if (vma->vm_ops && vma->vm_ops->get_policy) |
@@ -786,7 +786,7 @@ static struct page *alloc_page_interleave(unsigned int __nocast gfp, unsigned or | |||
786 | struct page * | 786 | struct page * |
787 | alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr) | 787 | alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr) |
788 | { | 788 | { |
789 | struct mempolicy *pol = get_vma_policy(vma, addr); | 789 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
790 | 790 | ||
791 | cpuset_update_current_mems_allowed(); | 791 | cpuset_update_current_mems_allowed(); |
792 | 792 | ||
@@ -908,7 +908,7 @@ void __mpol_free(struct mempolicy *p) | |||
908 | /* Find first node suitable for an allocation */ | 908 | /* Find first node suitable for an allocation */ |
909 | int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) | 909 | int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) |
910 | { | 910 | { |
911 | struct mempolicy *pol = get_vma_policy(vma, addr); | 911 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
912 | 912 | ||
913 | switch (pol->policy) { | 913 | switch (pol->policy) { |
914 | case MPOL_DEFAULT: | 914 | case MPOL_DEFAULT: |
@@ -928,7 +928,7 @@ int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) | |||
928 | /* Find secondary valid nodes for an allocation */ | 928 | /* Find secondary valid nodes for an allocation */ |
929 | int mpol_node_valid(int nid, struct vm_area_struct *vma, unsigned long addr) | 929 | int mpol_node_valid(int nid, struct vm_area_struct *vma, unsigned long addr) |
930 | { | 930 | { |
931 | struct mempolicy *pol = get_vma_policy(vma, addr); | 931 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
932 | 932 | ||
933 | switch (pol->policy) { | 933 | switch (pol->policy) { |
934 | case MPOL_PREFERRED: | 934 | case MPOL_PREFERRED: |