Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198227
b: refs/heads/master
c: 15d7783
h: refs/heads/master
i:
  198225: ebe3c6d
  198223: a6ae2c7
v: v3
  • Loading branch information
Lee Schermerhorn authored and Linus Torvalds committed May 25, 2010
1 parent 22c22a5 commit ec325b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: 345ace9c797030e77da8ff211b9502370b9d81ab
refs/heads/master: 15d77835ac48dbc2d4884376ea6a08b65b1c40ba
16 changes: 6 additions & 10 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1995,26 +1995,22 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
return;
/* contextualize the tmpfs mount point mempolicy */
new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask);
if (IS_ERR(new)) {
mpol_put(mpol); /* drop our ref on sb mpol */
NODEMASK_SCRATCH_FREE(scratch);
return; /* no valid nodemask intersection */
}
if (IS_ERR(new))
goto put_free; /* no valid nodemask intersection */

task_lock(current);
ret = mpol_set_nodemask(new, &mpol->w.user_nodemask, scratch);
task_unlock(current);
mpol_put(mpol); /* drop our ref on sb mpol */
if (ret) {
NODEMASK_SCRATCH_FREE(scratch);
mpol_put(new);
return;
}
if (ret)
goto put_free;

/* Create pseudo-vma that contains just the policy */
memset(&pvma, 0, sizeof(struct vm_area_struct));
pvma.vm_end = TASK_SIZE; /* policy covers entire file */
mpol_set_shared_policy(sp, &pvma, new); /* adds ref */

put_free:
mpol_put(new); /* drop initial ref */
NODEMASK_SCRATCH_FREE(scratch);
}
Expand Down

0 comments on commit ec325b1

Please sign in to comment.