Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94033
b: refs/heads/master
c: ae4d8c1
h: refs/heads/master
i:
  94031: 57ee047
v: v3
  • Loading branch information
Lee Schermerhorn authored and Linus Torvalds committed Apr 28, 2008
1 parent d0f6155 commit f7a011a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4e53d910b7dde2685b177f1e7c3e3e0b4a42f7b
refs/heads/master: ae4d8c16aa22775f5731677abb8a82f03cec877e
3 changes: 1 addition & 2 deletions trunk/ipc/shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ static struct mempolicy *shm_get_policy(struct vm_area_struct *vma,
else if (vma->vm_policy) {
pol = vma->vm_policy;
mpol_get(pol); /* get_vma_policy() expects this */
} else
pol = current->mempolicy;
}
return pol;
}
#endif
Expand Down
7 changes: 5 additions & 2 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,15 +1262,18 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
* @task != current]. It is the caller's responsibility to
* free the reference in these cases.
*/
static struct mempolicy * get_vma_policy(struct task_struct *task,
static struct mempolicy *get_vma_policy(struct task_struct *task,
struct vm_area_struct *vma, unsigned long addr)
{
struct mempolicy *pol = task->mempolicy;
int shared_pol = 0;

if (vma) {
if (vma->vm_ops && vma->vm_ops->get_policy) {
pol = vma->vm_ops->get_policy(vma, addr);
struct mempolicy *vpol = vma->vm_ops->get_policy(vma,
addr);
if (vpol)
pol = vpol;
shared_pol = 1; /* if pol non-NULL, add ref below */
} else if (vma->vm_policy &&
vma->vm_policy->policy != MPOL_DEFAULT)
Expand Down

0 comments on commit f7a011a

Please sign in to comment.